From 780d266fe1e82a747bdec2a2296f0f0304e33925 Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 14 May 2023 16:33:13 +0800 Subject: [PATCH] Decommission python client generator (#15486) * decomission python client generator * udpate * update doc --- CI/circle_parallel.sh | 6 +- .../python-features-dynamic-servers.yaml | 6 - bin/configs/python.yaml | 7 - bin/configs/python_3_0_3_unit_test.yaml | 6 - docs/generators.md | 1 - .../openapitools/codegen/DefaultCodegen.java | 8 +- .../codegen/DefaultGenerator.java | 4 +- .../languages/PythonClientCodegen.java | 2804 ---- .../org.openapitools.codegen.CodegenConfig | 1 - .../codegen/DefaultGeneratorTest.java | 2 +- .../codegen/python/PythonClientTest.java | 262 - pom.xml | 2 - .../client/3_0_3_unit_test/python/.gitignore | 67 - .../3_0_3_unit_test/python/.gitlab-ci.yml | 24 - .../python/.openapi-generator-ignore | 23 - .../python/.openapi-generator/FILES | 421 - .../python/.openapi-generator/VERSION | 1 - .../client/3_0_3_unit_test/python/.travis.yml | 13 - .../client/3_0_3_unit_test/python/Makefile | 16 - .../client/3_0_3_unit_test/python/README.md | 1015 -- .../python/dev-requirements.txt | 2 - .../docs/apis/tags/AdditionalPropertiesApi.md | 545 - .../python/docs/apis/tags/AllOfApi.md | 1205 -- .../python/docs/apis/tags/AnyOfApi.md | 673 - .../docs/apis/tags/ContentTypeJsonApi.md | 11681 ---------------- .../python/docs/apis/tags/DefaultApi.md | 276 - .../python/docs/apis/tags/EnumApi.md | 1075 -- .../python/docs/apis/tags/FormatApi.md | 1205 -- .../python/docs/apis/tags/ItemsApi.md | 149 - .../python/docs/apis/tags/MaxItemsApi.md | 141 - .../python/docs/apis/tags/MaxLengthApi.md | 141 - .../python/docs/apis/tags/MaxPropertiesApi.md | 274 - .../python/docs/apis/tags/MaximumApi.md | 274 - .../python/docs/apis/tags/MinItemsApi.md | 141 - .../python/docs/apis/tags/MinLengthApi.md | 141 - .../python/docs/apis/tags/MinPropertiesApi.md | 141 - .../python/docs/apis/tags/MinimumApi.md | 274 - .../python/docs/apis/tags/ModelNotApi.md | 471 - .../python/docs/apis/tags/MultipleOfApi.md | 540 - .../python/docs/apis/tags/OneOfApi.md | 806 -- .../docs/apis/tags/OperationRequestBodyApi.md | 6335 --------- .../python/docs/apis/tags/PathPostApi.md | 11681 ---------------- .../python/docs/apis/tags/PatternApi.md | 274 - .../python/docs/apis/tags/PropertiesApi.md | 274 - .../python/docs/apis/tags/RefApi.md | 1090 -- .../python/docs/apis/tags/RequiredApi.md | 540 - .../ResponseContentContentTypeSchemaApi.md | 5354 ------- .../python/docs/apis/tags/TypeApi.md | 941 -- .../python/docs/apis/tags/UniqueItemsApi.md | 274 - ...pertiesAllowsASchemaWhichShouldValidate.md | 16 - ...AdditionalpropertiesAreAllowedByDefault.md | 16 - .../AdditionalpropertiesCanExistByItself.md | 14 - ...nalpropertiesShouldNotLookInApplicators.md | 33 - .../python/docs/models/Allof.md | 42 - .../models/AllofCombinedWithAnyofOneof.md | 44 - .../python/docs/models/AllofSimpleTypes.md | 30 - .../python/docs/models/AllofWithBaseSchema.md | 48 - .../docs/models/AllofWithOneEmptySchema.md | 22 - .../models/AllofWithTheFirstEmptySchema.md | 30 - .../models/AllofWithTheLastEmptySchema.md | 30 - .../docs/models/AllofWithTwoEmptySchemas.md | 30 - .../python/docs/models/Anyof.md | 30 - .../python/docs/models/AnyofComplexTypes.md | 42 - .../python/docs/models/AnyofWithBaseSchema.md | 30 - .../docs/models/AnyofWithOneEmptySchema.md | 30 - .../docs/models/ArrayTypeMatchesArrays.md | 14 - .../docs/models/BooleanTypeMatchesBooleans.md | 9 - .../python/docs/models/ByInt.md | 9 - .../python/docs/models/ByNumber.md | 9 - .../python/docs/models/BySmallNumber.md | 9 - .../python/docs/models/DateTimeFormat.md | 9 - .../python/docs/models/EmailFormat.md | 9 - .../docs/models/EnumWith0DoesNotMatchFalse.md | 9 - .../docs/models/EnumWith1DoesNotMatchTrue.md | 9 - .../docs/models/EnumWithEscapedCharacters.md | 9 - .../docs/models/EnumWithFalseDoesNotMatch0.md | 9 - .../docs/models/EnumWithTrueDoesNotMatch1.md | 9 - .../python/docs/models/EnumsInProperties.md | 16 - .../python/docs/models/ForbiddenProperty.md | 35 - .../python/docs/models/HostnameFormat.md | 9 - .../docs/models/IntegerTypeMatchesIntegers.md | 9 - ...ShouldNotRaiseErrorWhenFloatDivisionInf.md | 9 - .../models/InvalidStringValueForDefault.md | 15 - .../python/docs/models/Ipv4Format.md | 9 - .../python/docs/models/Ipv6Format.md | 9 - .../python/docs/models/JsonPointerFormat.md | 9 - .../python/docs/models/MaximumValidation.md | 9 - .../MaximumValidationWithUnsignedInteger.md | 9 - .../python/docs/models/MaxitemsValidation.md | 9 - .../python/docs/models/MaxlengthValidation.md | 9 - .../Maxproperties0MeansTheObjectIsEmpty.md | 9 - .../docs/models/MaxpropertiesValidation.md | 9 - .../python/docs/models/MinimumValidation.md | 9 - .../MinimumValidationWithSignedInteger.md | 9 - .../python/docs/models/MinitemsValidation.md | 9 - .../python/docs/models/MinlengthValidation.md | 9 - .../docs/models/MinpropertiesValidation.md | 9 - .../python/docs/models/ModelNot.md | 22 - .../NestedAllofToCheckValidationSemantics.md | 35 - .../NestedAnyofToCheckValidationSemantics.md | 35 - .../python/docs/models/NestedItems.md | 50 - .../NestedOneofToCheckValidationSemantics.md | 35 - .../docs/models/NotMoreComplexSchema.md | 28 - .../docs/models/NulCharactersInStrings.md | 9 - .../NullTypeMatchesOnlyTheNullObject.md | 9 - .../docs/models/NumberTypeMatchesNumbers.md | 9 - .../docs/models/ObjectPropertiesValidation.md | 16 - .../python/docs/models/Oneof.md | 30 - .../python/docs/models/OneofComplexTypes.md | 42 - .../python/docs/models/OneofWithBaseSchema.md | 30 - .../docs/models/OneofWithEmptySchema.md | 30 - .../python/docs/models/OneofWithRequired.md | 30 - .../docs/models/PatternIsNotAnchored.md | 9 - .../python/docs/models/PatternValidation.md | 9 - .../models/PropertiesWithEscapedCharacters.md | 20 - .../PropertyNamedRefThatIsNotAReference.md | 15 - .../docs/models/RefInAdditionalproperties.md | 14 - .../python/docs/models/RefInAllof.md | 15 - .../python/docs/models/RefInAnyof.md | 15 - .../python/docs/models/RefInItems.md | 14 - .../python/docs/models/RefInNot.md | 15 - .../python/docs/models/RefInOneof.md | 15 - .../python/docs/models/RefInProperty.md | 15 - .../docs/models/RequiredDefaultValidation.md | 15 - .../python/docs/models/RequiredValidation.md | 16 - .../docs/models/RequiredWithEmptyArray.md | 15 - .../models/RequiredWithEscapedCharacters.md | 9 - .../docs/models/SimpleEnumValidation.md | 9 - .../docs/models/StringTypeMatchesStrings.md | 9 - ...DoesNotDoAnythingIfThePropertyIsMissing.md | 15 - .../docs/models/UniqueitemsFalseValidation.md | 9 - .../docs/models/UniqueitemsValidation.md | 9 - .../python/docs/models/UriFormat.md | 9 - .../python/docs/models/UriReferenceFormat.md | 9 - .../python/docs/models/UriTemplateFormat.md | 9 - .../client/3_0_3_unit_test/python/git_push.sh | 58 - .../client/3_0_3_unit_test/python/pom.xml | 46 - .../3_0_3_unit_test/python/requirements.txt | 6 - .../client/3_0_3_unit_test/python/setup.cfg | 2 - .../client/3_0_3_unit_test/python/setup.py | 47 - .../python/test-requirements.txt | 3 - .../3_0_3_unit_test/python/test/__init__.py | 0 .../python/test/test_models/__init__.py | 0 ...s_allows_a_schema_which_should_validate.py | 64 - ...tionalproperties_are_allowed_by_default.py | 39 - ...dditionalproperties_can_exist_by_itself.py | 46 - ...operties_should_not_look_in_applicators.py | 50 - .../python/test/test_models/test_allof.py | 72 - .../test_allof_combined_with_anyof_oneof.py | 88 - .../test_models/test_allof_simple_types.py | 40 - .../test_allof_with_base_schema.py | 89 - .../test_allof_with_one_empty_schema.py | 32 - .../test_allof_with_the_first_empty_schema.py | 40 - .../test_allof_with_the_last_empty_schema.py | 40 - .../test_allof_with_two_empty_schemas.py | 32 - .../python/test/test_models/test_anyof.py | 54 - .../test_models/test_anyof_complex_types.py | 70 - .../test_anyof_with_base_schema.py | 48 - .../test_anyof_with_one_empty_schema.py | 39 - .../test_array_type_matches_arrays.py | 82 - .../test_boolean_type_matches_booleans.py | 105 - .../python/test/test_models/test_by_int.py | 47 - .../python/test/test_models/test_by_number.py | 47 - .../test/test_models/test_by_small_number.py | 40 - .../test/test_models/test_date_time_format.py | 69 - .../test/test_models/test_email_format.py | 69 - .../test_enum_with0_does_not_match_false.py | 47 - .../test_enum_with1_does_not_match_true.py | 47 - .../test_enum_with_escaped_characters.py | 47 - .../test_enum_with_false_does_not_match0.py | 48 - .../test_enum_with_true_does_not_match1.py | 48 - .../test_models/test_enums_in_properties.py | 93 - .../test_models/test_forbidden_property.py | 50 - .../test/test_models/test_hostname_format.py | 69 - .../test_integer_type_matches_integers.py | 97 - ...not_raise_error_when_float_division_inf.py | 40 - .../test_invalid_string_value_for_default.py | 43 - .../test/test_models/test_ipv4_format.py | 69 - .../test/test_models/test_ipv6_format.py | 69 - .../test_models/test_json_pointer_format.py | 69 - .../test_models/test_maximum_validation.py | 54 - ...aximum_validation_with_unsigned_integer.py | 54 - .../test_models/test_maxitems_validation.py | 63 - .../test_models/test_maxlength_validation.py | 61 - ...axproperties0_means_the_object_is_empty.py | 44 - .../test_maxproperties_validation.py | 87 - .../test_models/test_minimum_validation.py | 54 - ..._minimum_validation_with_signed_integer.py | 76 - .../test_models/test_minitems_validation.py | 60 - .../test_models/test_minlength_validation.py | 62 - .../test_minproperties_validation.py | 78 - .../python/test/test_models/test_model_not.py | 40 - ...ted_allof_to_check_validation_semantics.py | 40 - ...ted_anyof_to_check_validation_semantics.py | 40 - .../test/test_models/test_nested_items.py | 129 - ...ted_oneof_to_check_validation_semantics.py | 40 - .../test_not_more_complex_schema.py | 53 - .../test_nul_characters_in_strings.py | 40 - ..._null_type_matches_only_the_null_object.py | 106 - .../test_number_type_matches_numbers.py | 96 - .../test_object_properties_validation.py | 92 - .../python/test/test_models/test_oneof.py | 55 - .../test_models/test_oneof_complex_types.py | 71 - .../test_oneof_with_base_schema.py | 48 - .../test_oneof_with_empty_schema.py | 40 - .../test_models/test_oneof_with_required.py | 75 - .../test_pattern_is_not_anchored.py | 32 - .../test_models/test_pattern_validation.py | 84 - ...test_properties_with_escaped_characters.py | 66 - ...perty_named_ref_that_is_not_a_reference.py | 46 - .../test_ref_in_additionalproperties.py | 52 - .../test/test_models/test_ref_in_allof.py | 46 - .../test/test_models/test_ref_in_anyof.py | 46 - .../test/test_models/test_ref_in_items.py | 50 - .../test/test_models/test_ref_in_not.py | 46 - .../test/test_models/test_ref_in_oneof.py | 46 - .../test/test_models/test_ref_in_property.py | 52 - .../test_required_default_validation.py | 33 - .../test_models/test_required_validation.py | 68 - .../test_required_with_empty_array.py | 33 - .../test_required_with_escaped_characters.py | 58 - .../test_simple_enum_validation.py | 40 - .../test_string_type_matches_strings.py | 96 - ..._do_anything_if_the_property_is_missing.py | 54 - .../test_uniqueitems_false_validation.py | 246 - .../test_uniqueitems_validation.py | 427 - .../test/test_models/test_uri_format.py | 69 - .../test_models/test_uri_reference_format.py | 69 - .../test_models/test_uri_template_format.py | 69 - .../python/test/test_paths/__init__.py | 68 - .../__init__.py | 0 .../test_post.py | 132 - .../__init__.py | 0 .../test_post.py | 78 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 95 - .../__init__.py | 0 .../test_post.py | 169 - .../__init__.py | 0 .../test_post.py | 129 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 152 - .../__init__.py | 0 .../test_post.py | 71 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 71 - .../__init__.py | 0 .../test_post.py | 161 - .../__init__.py | 0 .../test_post.py | 145 - .../__init__.py | 0 .../test_post.py | 99 - .../__init__.py | 0 .../test_post.py | 101 - .../__init__.py | 0 .../test_post.py | 157 - .../__init__.py | 0 .../test_post.py | 215 - .../__init__.py | 0 .../test_post.py | 115 - .../__init__.py | 0 .../test_post.py | 115 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 115 - .../__init__.py | 0 .../test_post.py | 115 - .../__init__.py | 0 .../test_post.py | 115 - .../__init__.py | 0 .../test_post.py | 99 - .../__init__.py | 0 .../test_post.py | 99 - .../__init__.py | 0 .../test_post.py | 179 - .../__init__.py | 0 .../test_post.py | 95 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 201 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 105 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 145 - .../__init__.py | 0 .../test_post.py | 145 - .../__init__.py | 0 .../test_post.py | 154 - .../__init__.py | 0 .../test_post.py | 175 - .../__init__.py | 0 .../test_post.py | 89 - .../__init__.py | 0 .../test_post.py | 224 - .../__init__.py | 0 .../test_post.py | 145 - .../__init__.py | 0 .../test_post.py | 219 - .../__init__.py | 0 .../test_post.py | 151 - .../__init__.py | 0 .../test_post.py | 159 - .../__init__.py | 0 .../test_post.py | 215 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 180 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 121 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 199 - .../__init__.py | 0 .../test_post.py | 217 - .../__init__.py | 0 .../test_post.py | 212 - .../__init__.py | 0 .../test_post.py | 157 - .../__init__.py | 0 .../test_post.py | 145 - .../__init__.py | 0 .../test_post.py | 129 - .../__init__.py | 0 .../test_post.py | 99 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 149 - .../__init__.py | 0 .../test_post.py | 71 - .../__init__.py | 0 .../test_post.py | 267 - .../__init__.py | 0 .../test_post.py | 111 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 97 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 95 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 91 - .../__init__.py | 0 .../test_post.py | 97 - .../__init__.py | 0 .../test_post.py | 72 - .../__init__.py | 0 .../test_post.py | 182 - .../__init__.py | 0 .../test_post.py | 72 - .../__init__.py | 0 .../test_post.py | 103 - .../__init__.py | 0 .../test_post.py | 85 - .../__init__.py | 0 .../test_post.py | 217 - .../__init__.py | 0 .../test_post.py | 122 - .../__init__.py | 0 .../test_post.py | 607 - .../__init__.py | 0 .../test_post.py | 848 -- .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 223 - .../__init__.py | 0 .../test_post.py | 141 - .../__init__.py | 0 .../test_post.py | 77 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 104 - .../__init__.py | 0 .../test_post.py | 238 - .../__init__.py | 0 .../test_post.py | 158 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 191 - .../__init__.py | 0 .../test_post.py | 70 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 70 - .../__init__.py | 0 .../test_post.py | 170 - .../__init__.py | 0 .../test_post.py | 154 - .../__init__.py | 0 .../test_post.py | 118 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 216 - .../__init__.py | 0 .../test_post.py | 294 - .../__init__.py | 0 .../test_post.py | 124 - .../__init__.py | 0 .../test_post.py | 124 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 124 - .../__init__.py | 0 .../test_post.py | 124 - .../__init__.py | 0 .../test_post.py | 124 - .../__init__.py | 0 .../test_post.py | 118 - .../__init__.py | 0 .../test_post.py | 118 - .../__init__.py | 0 .../test_post.py | 218 - .../__init__.py | 0 .../test_post.py | 104 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 270 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 104 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 154 - .../__init__.py | 0 .../test_post.py | 154 - .../__init__.py | 0 .../test_post.py | 163 - .../__init__.py | 0 .../test_post.py | 184 - .../__init__.py | 0 .../test_post.py | 98 - .../__init__.py | 0 .../test_post.py | 233 - .../__init__.py | 0 .../test_post.py | 154 - .../__init__.py | 0 .../test_post.py | 238 - .../__init__.py | 0 .../test_post.py | 160 - .../__init__.py | 0 .../test_post.py | 178 - .../__init__.py | 0 .../test_post.py | 224 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 199 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 130 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 288 - .../__init__.py | 0 .../test_post.py | 276 - .../__init__.py | 0 .../test_post.py | 231 - .../__init__.py | 0 .../test_post.py | 216 - .../__init__.py | 0 .../test_post.py | 164 - .../__init__.py | 0 .../test_post.py | 148 - .../__init__.py | 0 .../test_post.py | 118 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 168 - .../__init__.py | 0 .../test_post.py | 70 - .../__init__.py | 0 .../test_post.py | 276 - .../__init__.py | 0 .../test_post.py | 120 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 106 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 104 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 100 - .../__init__.py | 0 .../test_post.py | 106 - .../__init__.py | 0 .../test_post.py | 71 - .../__init__.py | 0 .../test_post.py | 191 - .../__init__.py | 0 .../test_post.py | 71 - .../__init__.py | 0 .../test_post.py | 112 - .../__init__.py | 0 .../test_post.py | 94 - .../__init__.py | 0 .../test_post.py | 276 - .../__init__.py | 0 .../test_post.py | 131 - .../__init__.py | 0 .../test_post.py | 606 - .../__init__.py | 0 .../test_post.py | 947 -- .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 222 - .../__init__.py | 0 .../test_post.py | 222 - .../3_0_3_unit_test/python/test_python.sh | 33 - .../client/3_0_3_unit_test/python/tox.ini | 10 - .../python/unit_test_api/__init__.py | 28 - .../python/unit_test_api/api_client.py | 1499 -- .../python/unit_test_api/apis/__init__.py | 3 - .../python/unit_test_api/apis/path_to_api.py | 536 - .../unit_test_api/apis/paths/__init__.py | 3 - ...hema_which_should_validate_request_body.py | 7 - ...ies_are_allowed_by_default_request_body.py | 7 - ...erties_can_exist_by_itself_request_body.py | 7 - ...ld_not_look_in_applicators_request_body.py | 7 - ..._combined_with_anyof_oneof_request_body.py | 7 - .../request_body_post_allof_request_body.py | 7 - ...dy_post_allof_simple_types_request_body.py | 7 - ...ost_allof_with_base_schema_request_body.py | 7 - ...llof_with_one_empty_schema_request_body.py | 7 - ...ith_the_first_empty_schema_request_body.py | 7 - ...with_the_last_empty_schema_request_body.py | 7 - ...lof_with_two_empty_schemas_request_body.py | 7 - ...y_post_anyof_complex_types_request_body.py | 7 - .../request_body_post_anyof_request_body.py | 7 - ...ost_anyof_with_base_schema_request_body.py | 7 - ...nyof_with_one_empty_schema_request_body.py | 7 - ..._array_type_matches_arrays_request_body.py | 7 - ...lean_type_matches_booleans_request_body.py | 7 - .../request_body_post_by_int_request_body.py | 7 - ...equest_body_post_by_number_request_body.py | 7 - ..._body_post_by_small_number_request_body.py | 7 - ...body_post_date_time_format_request_body.py | 7 - ...est_body_post_email_format_request_body.py | 7 - ...with0_does_not_match_false_request_body.py | 7 - ..._with1_does_not_match_true_request_body.py | 7 - ...um_with_escaped_characters_request_body.py | 7 - ...with_false_does_not_match0_request_body.py | 7 - ..._with_true_does_not_match1_request_body.py | 7 - ...y_post_enums_in_properties_request_body.py | 7 - ...dy_post_forbidden_property_request_body.py | 7 - ..._body_post_hostname_format_request_body.py | 7 - ...eger_type_matches_integers_request_body.py | 7 - ...or_when_float_division_inf_request_body.py | 7 - ...d_string_value_for_default_request_body.py | 7 - ...uest_body_post_ipv4_format_request_body.py | 7 - ...uest_body_post_ipv6_format_request_body.py | 7 - ...y_post_json_pointer_format_request_body.py | 7 - ...dy_post_maximum_validation_request_body.py | 7 - ...tion_with_unsigned_integer_request_body.py | 7 - ...y_post_maxitems_validation_request_body.py | 7 - ..._post_maxlength_validation_request_body.py | 7 - ..._means_the_object_is_empty_request_body.py | 7 - ...t_maxproperties_validation_request_body.py | 7 - ...dy_post_minimum_validation_request_body.py | 7 - ...dation_with_signed_integer_request_body.py | 7 - ...y_post_minitems_validation_request_body.py | 7 - ..._post_minlength_validation_request_body.py | 7 - ...t_minproperties_validation_request_body.py | 7 - ...check_validation_semantics_request_body.py | 7 - ...check_validation_semantics_request_body.py | 7 - ...est_body_post_nested_items_request_body.py | 7 - ...check_validation_semantics_request_body.py | 7 - ...st_not_more_complex_schema_request_body.py | 7 - .../request_body_post_not_request_body.py | 7 - ..._nul_characters_in_strings_request_body.py | 7 - ...tches_only_the_null_object_request_body.py | 7 - ...umber_type_matches_numbers_request_body.py | 7 - ...ject_properties_validation_request_body.py | 7 - ...bject_type_matches_objects_request_body.py | 7 - ...y_post_oneof_complex_types_request_body.py | 7 - .../request_body_post_oneof_request_body.py | 7 - ...ost_oneof_with_base_schema_request_body.py | 7 - ...st_oneof_with_empty_schema_request_body.py | 7 - ...y_post_oneof_with_required_request_body.py | 7 - ...st_pattern_is_not_anchored_request_body.py | 7 - ...dy_post_pattern_validation_request_body.py | 7 - ...es_with_escaped_characters_request_body.py | 7 - ...ef_that_is_not_a_reference_request_body.py | 7 - ...ef_in_additionalproperties_request_body.py | 7 - ...est_body_post_ref_in_allof_request_body.py | 7 - ...est_body_post_ref_in_anyof_request_body.py | 7 - ...est_body_post_ref_in_items_request_body.py | 7 - ...quest_body_post_ref_in_not_request_body.py | 7 - ...est_body_post_ref_in_oneof_request_body.py | 7 - ..._body_post_ref_in_property_request_body.py | 7 - ...equired_default_validation_request_body.py | 7 - ...y_post_required_validation_request_body.py | 7 - ..._required_with_empty_array_request_body.py | 7 - ...ed_with_escaped_characters_request_body.py | 7 - ...ost_simple_enum_validation_request_body.py | 7 - ...tring_type_matches_strings_request_body.py | 7 - ...if_the_property_is_missing_request_body.py | 7 - ...iqueitems_false_validation_request_body.py | 7 - ...ost_uniqueitems_validation_request_body.py | 7 - ...quest_body_post_uri_format_request_body.py | 7 - ..._post_uri_reference_format_request_body.py | 7 - ...y_post_uri_template_format_request_body.py | 7 - ...alidate_response_body_for_content_types.py | 7 - ...default_response_body_for_content_types.py | 7 - ..._itself_response_body_for_content_types.py | 7 - ...icators_response_body_for_content_types.py | 7 - ...f_oneof_response_body_for_content_types.py | 7 - ...t_allof_response_body_for_content_types.py | 7 - ...e_types_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ...schemas_response_body_for_content_types.py | 7 - ...x_types_response_body_for_content_types.py | 7 - ...t_anyof_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._arrays_response_body_for_content_types.py | 7 - ...ooleans_response_body_for_content_types.py | 7 - ..._by_int_response_body_for_content_types.py | 7 - ..._number_response_body_for_content_types.py | 7 - ..._number_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ...h_false_response_body_for_content_types.py | 7 - ...ch_true_response_body_for_content_types.py | 7 - ...racters_response_body_for_content_types.py | 7 - ..._match0_response_body_for_content_types.py | 7 - ..._match1_response_body_for_content_types.py | 7 - ...perties_response_body_for_content_types.py | 7 - ...roperty_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ...ntegers_response_body_for_content_types.py | 7 - ...ion_inf_response_body_for_content_types.py | 7 - ...default_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...integer_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...s_empty_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...integer_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...mantics_response_body_for_content_types.py | 7 - ...mantics_response_body_for_content_types.py | 7 - ...d_items_response_body_for_content_types.py | 7 - ...mantics_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ...ost_not_response_body_for_content_types.py | 7 - ...strings_response_body_for_content_types.py | 7 - ..._object_response_body_for_content_types.py | 7 - ...numbers_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...objects_response_body_for_content_types.py | 7 - ...x_types_response_body_for_content_types.py | 7 - ...t_oneof_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ..._schema_response_body_for_content_types.py | 7 - ...equired_response_body_for_content_types.py | 7 - ...nchored_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...racters_response_body_for_content_types.py | 7 - ...ference_response_body_for_content_types.py | 7 - ...perties_response_body_for_content_types.py | 7 - ...n_allof_response_body_for_content_types.py | 7 - ...n_anyof_response_body_for_content_types.py | 7 - ...n_items_response_body_for_content_types.py | 7 - ..._in_not_response_body_for_content_types.py | 7 - ...n_oneof_response_body_for_content_types.py | 7 - ...roperty_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...y_array_response_body_for_content_types.py | 7 - ...racters_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...strings_response_body_for_content_types.py | 7 - ...missing_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ...idation_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - ..._format_response_body_for_content_types.py | 7 - .../python/unit_test_api/apis/tag_to_api.py | 98 - .../unit_test_api/apis/tags/__init__.py | 36 - .../apis/tags/additional_properties_api.py | 37 - .../unit_test_api/apis/tags/all_of_api.py | 57 - .../unit_test_api/apis/tags/any_of_api.py | 41 - .../apis/tags/content_type_json_api.py | 369 - .../unit_test_api/apis/tags/default_api.py | 29 - .../unit_test_api/apis/tags/enum_api.py | 53 - .../unit_test_api/apis/tags/format_api.py | 57 - .../unit_test_api/apis/tags/items_api.py | 25 - .../unit_test_api/apis/tags/max_items_api.py | 25 - .../unit_test_api/apis/tags/max_length_api.py | 25 - .../apis/tags/max_properties_api.py | 29 - .../unit_test_api/apis/tags/maximum_api.py | 29 - .../unit_test_api/apis/tags/min_items_api.py | 25 - .../unit_test_api/apis/tags/min_length_api.py | 25 - .../apis/tags/min_properties_api.py | 25 - .../unit_test_api/apis/tags/minimum_api.py | 29 - .../unit_test_api/apis/tags/model_not_api.py | 33 - .../apis/tags/multiple_of_api.py | 37 - .../unit_test_api/apis/tags/one_of_api.py | 45 - .../apis/tags/operation_request_body_api.py | 195 - .../unit_test_api/apis/tags/path_post_api.py | 369 - .../unit_test_api/apis/tags/pattern_api.py | 29 - .../unit_test_api/apis/tags/properties_api.py | 29 - .../python/unit_test_api/apis/tags/ref_api.py | 53 - .../unit_test_api/apis/tags/required_api.py | 37 - ...esponse_content_content_type_schema_api.py | 195 - .../unit_test_api/apis/tags/type_api.py | 49 - .../apis/tags/unique_items_api.py | 29 - .../python/unit_test_api/configuration.py | 426 - .../python/unit_test_api/exceptions.py | 147 - .../python/unit_test_api/model/__init__.py | 5 - ...s_allows_a_schema_which_should_validate.py | 87 - ..._allows_a_schema_which_should_validate.pyi | 87 - ...tionalproperties_are_allowed_by_default.py | 89 - ...ionalproperties_are_allowed_by_default.pyi | 89 - ...dditionalproperties_can_exist_by_itself.py | 57 - ...ditionalproperties_can_exist_by_itself.pyi | 57 - ...operties_should_not_look_in_applicators.py | 123 - ...perties_should_not_look_in_applicators.pyi | 123 - .../python/unit_test_api/model/allof.py | 177 - .../python/unit_test_api/model/allof.pyi | 177 - .../model/allof_combined_with_anyof_oneof.py | 161 - .../model/allof_combined_with_anyof_oneof.pyi | 158 - .../unit_test_api/model/allof_simple_types.py | 111 - .../model/allof_simple_types.pyi | 109 - .../model/allof_with_base_schema.py | 211 - .../model/allof_with_base_schema.pyi | 211 - .../model/allof_with_one_empty_schema.py | 65 - .../model/allof_with_one_empty_schema.pyi | 65 - .../allof_with_the_first_empty_schema.py | 67 - .../allof_with_the_first_empty_schema.pyi | 67 - .../model/allof_with_the_last_empty_schema.py | 67 - .../allof_with_the_last_empty_schema.pyi | 67 - .../model/allof_with_two_empty_schemas.py | 67 - .../model/allof_with_two_empty_schemas.pyi | 67 - .../python/unit_test_api/model/anyof.py | 89 - .../python/unit_test_api/model/anyof.pyi | 88 - .../model/anyof_complex_types.py | 177 - .../model/anyof_complex_types.pyi | 177 - .../model/anyof_with_base_schema.py | 110 - .../model/anyof_with_base_schema.pyi | 108 - .../model/anyof_with_one_empty_schema.py | 67 - .../model/anyof_with_one_empty_schema.pyi | 67 - .../model/array_type_matches_arrays.py | 51 - .../model/array_type_matches_arrays.pyi | 51 - .../model/boolean_type_matches_booleans.py | 24 - .../model/boolean_type_matches_booleans.pyi | 24 - .../python/unit_test_api/model/by_int.py | 51 - .../python/unit_test_api/model/by_int.pyi | 50 - .../python/unit_test_api/model/by_number.py | 51 - .../python/unit_test_api/model/by_number.pyi | 50 - .../unit_test_api/model/by_small_number.py | 51 - .../unit_test_api/model/by_small_number.pyi | 50 - .../unit_test_api/model/date_time_format.py | 52 - .../unit_test_api/model/date_time_format.pyi | 52 - .../unit_test_api/model/email_format.py | 51 - .../unit_test_api/model/email_format.pyi | 51 - .../model/enum_with0_does_not_match_false.py | 44 - .../model/enum_with0_does_not_match_false.pyi | 38 - .../model/enum_with1_does_not_match_true.py | 44 - .../model/enum_with1_does_not_match_true.pyi | 38 - .../model/enum_with_escaped_characters.py | 49 - .../model/enum_with_escaped_characters.pyi | 42 - .../model/enum_with_false_does_not_match0.py | 44 - .../model/enum_with_false_does_not_match0.pyi | 38 - .../model/enum_with_true_does_not_match1.py | 44 - .../model/enum_with_true_does_not_match1.pyi | 38 - .../model/enums_in_properties.py | 123 - .../model/enums_in_properties.pyi | 111 - .../unit_test_api/model/forbidden_property.py | 79 - .../model/forbidden_property.pyi | 79 - .../unit_test_api/model/hostname_format.py | 51 - .../unit_test_api/model/hostname_format.pyi | 51 - .../model/integer_type_matches_integers.py | 24 - .../model/integer_type_matches_integers.pyi | 24 - ...not_raise_error_when_float_division_inf.py | 37 - ...ot_raise_error_when_float_division_inf.pyi | 34 - .../model/invalid_string_value_for_default.py | 87 - .../invalid_string_value_for_default.pyi | 84 - .../python/unit_test_api/model/ipv4_format.py | 51 - .../unit_test_api/model/ipv4_format.pyi | 51 - .../python/unit_test_api/model/ipv6_format.py | 51 - .../unit_test_api/model/ipv6_format.pyi | 51 - .../model/json_pointer_format.py | 51 - .../model/json_pointer_format.pyi | 51 - .../unit_test_api/model/maximum_validation.py | 51 - .../model/maximum_validation.pyi | 50 - ...aximum_validation_with_unsigned_integer.py | 51 - ...ximum_validation_with_unsigned_integer.pyi | 50 - .../model/maxitems_validation.py | 51 - .../model/maxitems_validation.pyi | 50 - .../model/maxlength_validation.py | 51 - .../model/maxlength_validation.pyi | 50 - ...axproperties0_means_the_object_is_empty.py | 51 - ...xproperties0_means_the_object_is_empty.pyi | 50 - .../model/maxproperties_validation.py | 51 - .../model/maxproperties_validation.pyi | 50 - .../unit_test_api/model/minimum_validation.py | 51 - .../model/minimum_validation.pyi | 50 - .../minimum_validation_with_signed_integer.py | 51 - ...minimum_validation_with_signed_integer.pyi | 50 - .../model/minitems_validation.py | 51 - .../model/minitems_validation.pyi | 50 - .../model/minlength_validation.py | 51 - .../model/minlength_validation.pyi | 50 - .../model/minproperties_validation.py | 51 - .../model/minproperties_validation.pyi | 50 - .../python/unit_test_api/model/model_not.py | 51 - .../python/unit_test_api/model/model_not.pyi | 51 - ...ted_allof_to_check_validation_semantics.py | 101 - ...ed_allof_to_check_validation_semantics.pyi | 101 - ...ted_anyof_to_check_validation_semantics.py | 101 - ...ed_anyof_to_check_validation_semantics.pyi | 101 - .../unit_test_api/model/nested_items.py | 117 - .../unit_test_api/model/nested_items.pyi | 117 - ...ted_oneof_to_check_validation_semantics.py | 101 - ...ed_oneof_to_check_validation_semantics.pyi | 101 - .../model/not_more_complex_schema.py | 100 - .../model/not_more_complex_schema.pyi | 100 - .../model/nul_characters_in_strings.py | 44 - .../model/nul_characters_in_strings.pyi | 38 - .../null_type_matches_only_the_null_object.py | 24 - ...null_type_matches_only_the_null_object.pyi | 24 - .../model/number_type_matches_numbers.py | 24 - .../model/number_type_matches_numbers.pyi | 24 - .../model/object_properties_validation.py | 89 - .../model/object_properties_validation.pyi | 89 - .../python/unit_test_api/model/oneof.py | 89 - .../python/unit_test_api/model/oneof.pyi | 88 - .../model/oneof_complex_types.py | 177 - .../model/oneof_complex_types.pyi | 177 - .../model/oneof_with_base_schema.py | 110 - .../model/oneof_with_base_schema.pyi | 108 - .../model/oneof_with_empty_schema.py | 67 - .../model/oneof_with_empty_schema.pyi | 67 - .../model/oneof_with_required.py | 124 - .../model/oneof_with_required.pyi | 124 - .../model/pattern_is_not_anchored.py | 53 - .../model/pattern_is_not_anchored.pyi | 50 - .../unit_test_api/model/pattern_validation.py | 53 - .../model/pattern_validation.pyi | 50 - .../properties_with_escaped_characters.py | 117 - .../properties_with_escaped_characters.pyi | 117 - ...perty_named_ref_that_is_not_a_reference.py | 77 - ...erty_named_ref_that_is_not_a_reference.pyi | 77 - .../model/ref_in_additionalproperties.py | 62 - .../model/ref_in_additionalproperties.pyi | 62 - .../unit_test_api/model/ref_in_allof.py | 66 - .../unit_test_api/model/ref_in_allof.pyi | 66 - .../unit_test_api/model/ref_in_anyof.py | 66 - .../unit_test_api/model/ref_in_anyof.pyi | 66 - .../unit_test_api/model/ref_in_items.py | 56 - .../unit_test_api/model/ref_in_items.pyi | 56 - .../python/unit_test_api/model/ref_in_not.py | 56 - .../python/unit_test_api/model/ref_in_not.pyi | 56 - .../unit_test_api/model/ref_in_oneof.py | 66 - .../unit_test_api/model/ref_in_oneof.pyi | 66 - .../unit_test_api/model/ref_in_property.py | 84 - .../unit_test_api/model/ref_in_property.pyi | 84 - .../model/required_default_validation.py | 79 - .../model/required_default_validation.pyi | 79 - .../model/required_validation.py | 94 - .../model/required_validation.pyi | 94 - .../model/required_with_empty_array.py | 79 - .../model/required_with_empty_array.pyi | 79 - .../model/required_with_escaped_characters.py | 59 - .../required_with_escaped_characters.pyi | 59 - .../model/simple_enum_validation.py | 54 - .../model/simple_enum_validation.pyi | 46 - .../model/string_type_matches_strings.py | 24 - .../model/string_type_matches_strings.pyi | 24 - ..._do_anything_if_the_property_is_missing.py | 86 - ...do_anything_if_the_property_is_missing.pyi | 83 - .../model/uniqueitems_false_validation.py | 51 - .../model/uniqueitems_false_validation.pyi | 50 - .../model/uniqueitems_validation.py | 51 - .../model/uniqueitems_validation.pyi | 50 - .../python/unit_test_api/model/uri_format.py | 51 - .../python/unit_test_api/model/uri_format.pyi | 51 - .../model/uri_reference_format.py | 51 - .../model/uri_reference_format.pyi | 51 - .../model/uri_template_format.py | 51 - .../model/uri_template_format.pyi | 51 - .../python/unit_test_api/models/__init__.py | 99 - .../python/unit_test_api/paths/__init__.py | 182 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 323 - .../post.pyi | 318 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 371 - .../post.pyi | 366 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 327 - .../post.pyi | 322 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 330 - .../post.pyi | 325 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 300 - .../post.pyi | 295 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 302 - .../post.pyi | 297 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 322 - .../post.pyi | 317 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 259 - .../post.pyi | 254 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 307 - .../post.pyi | 302 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 263 - .../post.pyi | 258 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 266 - .../post.pyi | 261 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 236 - .../post.pyi | 231 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 238 - .../post.pyi | 233 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../__init__.py | 7 - .../post.py | 258 - .../post.pyi | 253 - .../python/unit_test_api/rest.py | 257 - .../python/unit_test_api/schemas.py | 2475 ---- .../dynamic-servers/python/.gitignore | 67 - .../dynamic-servers/python/.gitlab-ci.yml | 24 - .../python/.openapi-generator-ignore | 23 - .../python/.openapi-generator/FILES | 23 - .../python/.openapi-generator/VERSION | 1 - .../dynamic-servers/python/.travis.yml | 13 - .../features/dynamic-servers/python/README.md | 202 - .../dynamic-servers/python/docs/UsageApi.md | 134 - .../python/docs/apis/tags/UsageApi.md | 136 - .../python/dynamic_servers/__init__.py | 28 - .../python/dynamic_servers/api/__init__.py | 3 - .../python/dynamic_servers/api/usage_api.py | 326 - .../python/dynamic_servers/api_client.py | 1499 -- .../python/dynamic_servers/apis/__init__.py | 3 - .../dynamic_servers/apis/path_to_api.py | 20 - .../dynamic_servers/apis/paths/__init__.py | 3 - .../dynamic_servers/apis/paths/custom.py | 7 - .../dynamic_servers/apis/paths/default.py | 7 - .../python/dynamic_servers/apis/tag_to_api.py | 17 - .../dynamic_servers/apis/tags/__init__.py | 9 - .../dynamic_servers/apis/tags/usage_api.py | 25 - .../python/dynamic_servers/configuration.py | 460 - .../python/dynamic_servers/exceptions.py | 147 - .../python/dynamic_servers/model/__init__.py | 5 - .../python/dynamic_servers/model_utils.py | 2058 --- .../python/dynamic_servers/models/__init__.py | 13 - .../python/dynamic_servers/paths/__init__.py | 10 - .../dynamic_servers/paths/custom/__init__.py | 7 - .../dynamic_servers/paths/custom/get.py | 304 - .../dynamic_servers/paths/custom/get.pyi | 249 - .../dynamic_servers/paths/default/__init__.py | 7 - .../dynamic_servers/paths/default/get.py | 237 - .../dynamic_servers/paths/default/get.pyi | 232 - .../python/dynamic_servers/rest.py | 257 - .../python/dynamic_servers/schemas.py | 2475 ---- .../dynamic-servers/python/git_push.sh | 58 - .../dynamic-servers/python/requirements.txt | 6 - .../features/dynamic-servers/python/setup.cfg | 2 - .../features/dynamic-servers/python/setup.py | 48 - .../python/test-requirements.txt | 3 - .../dynamic-servers/python/test/__init__.py | 0 .../python/test/test_models/__init__.py | 0 .../python/test/test_paths/__init__.py | 68 - .../test/test_paths/test_custom/__init__.py | 0 .../test/test_paths/test_custom/test_get.py | 41 - .../test/test_paths/test_default/__init__.py | 0 .../test/test_paths/test_default/test_get.py | 41 - .../python/test/test_usage_api.py | 121 - .../features/dynamic-servers/python/tox.ini | 10 - .../client/petstore/python/.gitignore | 67 - .../client/petstore/python/.gitlab-ci.yml | 24 - .../petstore/python/.openapi-generator-ignore | 23 - .../petstore/python/.openapi-generator/FILES | 402 - .../python/.openapi-generator/VERSION | 1 - .../client/petstore/python/.travis.yml | 13 - .../openapi3/client/petstore/python/Makefile | 16 - .../openapi3/client/petstore/python/README.md | 427 - .../petstore/python/dev-requirements.txt | 2 - .../python/docs/apis/tags/AnotherFakeApi.md | 93 - .../python/docs/apis/tags/DefaultApi.md | 76 - .../petstore/python/docs/apis/tags/FakeApi.md | 3522 ----- .../docs/apis/tags/FakeClassnameTags123Api.md | 104 - .../petstore/python/docs/apis/tags/PetApi.md | 1402 -- .../python/docs/apis/tags/StoreApi.md | 391 - .../petstore/python/docs/apis/tags/UserApi.md | 794 -- .../docs/models/AdditionalPropertiesClass.md | 109 - .../models/AdditionalPropertiesValidator.md | 53 - .../AdditionalPropertiesWithArrayOfEnums.md | 26 - .../petstore/python/docs/models/Address.md | 14 - .../petstore/python/docs/models/Animal.md | 16 - .../petstore/python/docs/models/AnimalFarm.md | 14 - .../python/docs/models/AnyTypeAndFormat.md | 23 - .../python/docs/models/AnyTypeNotString.md | 22 - .../python/docs/models/ApiResponse.md | 17 - .../petstore/python/docs/models/Apple.md | 16 - .../petstore/python/docs/models/AppleReq.md | 15 - .../python/docs/models/ArrayHoldingAnyType.md | 14 - .../docs/models/ArrayOfArrayOfNumberOnly.md | 39 - .../python/docs/models/ArrayOfEnums.md | 14 - .../python/docs/models/ArrayOfNumberOnly.md | 27 - .../petstore/python/docs/models/ArrayTest.md | 77 - .../models/ArrayWithValidationsInItems.md | 14 - .../petstore/python/docs/models/Banana.md | 15 - .../petstore/python/docs/models/BananaReq.md | 15 - .../client/petstore/python/docs/models/Bar.md | 9 - .../petstore/python/docs/models/BasquePig.md | 15 - .../petstore/python/docs/models/Boolean.md | 9 - .../python/docs/models/BooleanEnum.md | 9 - .../python/docs/models/Capitalization.md | 20 - .../client/petstore/python/docs/models/Cat.md | 29 - .../petstore/python/docs/models/Category.md | 16 - .../petstore/python/docs/models/ChildCat.md | 29 - .../petstore/python/docs/models/ClassModel.md | 17 - .../petstore/python/docs/models/Client.md | 15 - .../docs/models/ComplexQuadrilateral.md | 29 - ...omposedAnyOfDifferentTypesNoValidations.md | 147 - .../python/docs/models/ComposedArray.md | 14 - .../python/docs/models/ComposedBool.md | 22 - .../python/docs/models/ComposedNone.md | 22 - .../python/docs/models/ComposedNumber.md | 22 - .../python/docs/models/ComposedObject.md | 22 - .../models/ComposedOneOfDifferentTypes.md | 63 - .../python/docs/models/ComposedString.md | 22 - .../petstore/python/docs/models/Currency.md | 9 - .../petstore/python/docs/models/DanishPig.md | 15 - .../python/docs/models/DateTimeTest.md | 9 - .../docs/models/DateTimeWithValidations.md | 9 - .../python/docs/models/DateWithValidations.md | 9 - .../python/docs/models/DecimalPayload.md | 9 - .../client/petstore/python/docs/models/Dog.md | 29 - .../petstore/python/docs/models/Drawing.md | 30 - .../petstore/python/docs/models/EnumArrays.md | 28 - .../petstore/python/docs/models/EnumClass.md | 9 - .../petstore/python/docs/models/EnumTest.md | 23 - .../python/docs/models/EquilateralTriangle.md | 29 - .../petstore/python/docs/models/File.md | 17 - .../python/docs/models/FileSchemaTestClass.md | 28 - .../client/petstore/python/docs/models/Foo.md | 15 - .../petstore/python/docs/models/FormatTest.md | 47 - .../petstore/python/docs/models/FromSchema.md | 16 - .../petstore/python/docs/models/Fruit.md | 22 - .../petstore/python/docs/models/FruitReq.md | 24 - .../petstore/python/docs/models/GmFruit.md | 22 - .../python/docs/models/GrandparentAnimal.md | 15 - .../python/docs/models/HasOnlyReadOnly.md | 16 - .../python/docs/models/HealthCheckResult.md | 17 - .../python/docs/models/IntegerEnum.md | 9 - .../python/docs/models/IntegerEnumBig.md | 9 - .../python/docs/models/IntegerEnumOneValue.md | 9 - .../models/IntegerEnumWithDefaultValue.md | 9 - .../python/docs/models/IntegerMax10.md | 9 - .../python/docs/models/IntegerMin15.md | 9 - .../python/docs/models/IsoscelesTriangle.md | 29 - .../python/docs/models/JSONPatchRequest.md | 29 - .../models/JSONPatchRequestAddReplaceTest.md | 16 - .../docs/models/JSONPatchRequestMoveCopy.md | 16 - .../docs/models/JSONPatchRequestRemove.md | 15 - .../petstore/python/docs/models/Mammal.md | 17 - .../petstore/python/docs/models/MapTest.md | 66 - ...dPropertiesAndAdditionalPropertiesClass.md | 29 - .../python/docs/models/Model200Response.md | 18 - .../python/docs/models/ModelReturn.md | 17 - .../petstore/python/docs/models/Money.md | 16 - .../petstore/python/docs/models/Name.md | 19 - .../docs/models/NoAdditionalProperties.md | 15 - .../python/docs/models/NullableClass.md | 147 - .../python/docs/models/NullableShape.md | 26 - .../python/docs/models/NullableString.md | 9 - .../petstore/python/docs/models/Number.md | 9 - .../petstore/python/docs/models/NumberOnly.md | 15 - .../docs/models/NumberWithValidations.md | 9 - .../python/docs/models/ObjectInterface.md | 9 - .../ObjectModelWithArgAndArgsProperties.md | 16 - .../docs/models/ObjectModelWithRefProps.md | 19 - ...ithAllOfWithReqTestPropFromUnsetAddProp.md | 30 - .../models/ObjectWithDecimalProperties.md | 17 - .../models/ObjectWithDifficultlyNamedProps.md | 19 - .../ObjectWithInlineCompositionProperty.md | 35 - .../ObjectWithInvalidNamedRefedProperties.md | 16 - .../docs/models/ObjectWithOptionalTestProp.md | 15 - .../docs/models/ObjectWithValidations.md | 9 - .../petstore/python/docs/models/Order.md | 20 - .../petstore/python/docs/models/ParentPet.md | 15 - .../client/petstore/python/docs/models/Pet.md | 46 - .../client/petstore/python/docs/models/Pig.md | 16 - .../petstore/python/docs/models/Player.md | 18 - .../python/docs/models/Quadrilateral.md | 16 - .../docs/models/QuadrilateralInterface.md | 16 - .../python/docs/models/ReadOnlyFirst.md | 16 - .../python/docs/models/ScaleneTriangle.md | 29 - .../petstore/python/docs/models/Shape.md | 16 - .../python/docs/models/ShapeOrNull.md | 26 - .../python/docs/models/SimpleQuadrilateral.md | 29 - .../petstore/python/docs/models/SomeObject.md | 15 - .../python/docs/models/SpecialModelName.md | 17 - .../petstore/python/docs/models/String.md | 9 - .../python/docs/models/StringBooleanMap.md | 14 - .../petstore/python/docs/models/StringEnum.md | 9 - .../docs/models/StringEnumWithDefaultValue.md | 9 - .../docs/models/StringWithValidation.md | 9 - .../client/petstore/python/docs/models/Tag.md | 16 - .../petstore/python/docs/models/Triangle.md | 17 - .../python/docs/models/TriangleInterface.md | 16 - .../petstore/python/docs/models/UUIDString.md | 9 - .../petstore/python/docs/models/User.md | 67 - .../petstore/python/docs/models/Whale.md | 17 - .../petstore/python/docs/models/Zebra.md | 16 - .../client/petstore/python/git_push.sh | 58 - .../petstore/python/petstore_api/__init__.py | 31 - .../python/petstore_api/api_client.py | 1508 -- .../python/petstore_api/apis/__init__.py | 3 - .../python/petstore_api/apis/path_to_api.py | 158 - .../petstore_api/apis/paths/__init__.py | 3 - .../apis/paths/another_fake_dummy.py | 7 - .../python/petstore_api/apis/paths/fake.py | 13 - ...ditional_properties_with_array_of_enums.py | 7 - .../apis/paths/fake_body_with_file_schema.py | 7 - .../apis/paths/fake_body_with_query_params.py | 7 - .../apis/paths/fake_case_sensitive_params.py | 7 - .../apis/paths/fake_classname_test.py | 7 - .../apis/paths/fake_delete_coffee_id.py | 7 - .../petstore_api/apis/paths/fake_health.py | 7 - .../fake_inline_additional_properties.py | 7 - .../apis/paths/fake_inline_composition_.py | 7 - .../apis/paths/fake_json_form_data.py | 7 - .../apis/paths/fake_json_patch.py | 7 - .../apis/paths/fake_json_with_charset.py | 7 - .../apis/paths/fake_obj_in_query.py | 7 - ...parameter_collisions_1_a_b_ab_self_a_b_.py | 7 - ..._pet_id_upload_image_with_required_file.py | 7 - ...fake_query_param_with_json_content_type.py | 7 - .../apis/paths/fake_ref_obj_in_query.py | 7 - .../apis/paths/fake_refs_array_of_enums.py | 7 - .../apis/paths/fake_refs_arraymodel.py | 7 - .../apis/paths/fake_refs_boolean.py | 7 - ...composed_one_of_number_with_validations.py | 7 - .../petstore_api/apis/paths/fake_refs_enum.py | 7 - .../apis/paths/fake_refs_mammal.py | 7 - .../apis/paths/fake_refs_number.py | 7 - .../fake_refs_object_model_with_ref_props.py | 7 - .../apis/paths/fake_refs_string.py | 7 - .../paths/fake_response_without_schema.py | 7 - .../apis/paths/fake_test_query_parameters.py | 7 - .../apis/paths/fake_upload_download_file.py | 7 - .../apis/paths/fake_upload_file.py | 7 - .../apis/paths/fake_upload_files.py | 7 - .../python/petstore_api/apis/paths/foo.py | 7 - .../python/petstore_api/apis/paths/pet.py | 9 - .../apis/paths/pet_find_by_status.py | 7 - .../apis/paths/pet_find_by_tags.py | 7 - .../petstore_api/apis/paths/pet_pet_id.py | 11 - .../apis/paths/pet_pet_id_upload_image.py | 7 - .../apis/paths/store_inventory.py | 7 - .../petstore_api/apis/paths/store_order.py | 7 - .../apis/paths/store_order_order_id.py | 9 - .../python/petstore_api/apis/paths/user.py | 7 - .../apis/paths/user_create_with_array.py | 7 - .../apis/paths/user_create_with_list.py | 7 - .../petstore_api/apis/paths/user_login.py | 7 - .../petstore_api/apis/paths/user_logout.py | 7 - .../petstore_api/apis/paths/user_username.py | 11 - .../python/petstore_api/apis/tag_to_api.py | 35 - .../python/petstore_api/apis/tags/__init__.py | 15 - .../apis/tags/another_fake_api.py | 23 - .../petstore_api/apis/tags/default_api.py | 23 - .../python/petstore_api/apis/tags/fake_api.py | 87 - .../apis/tags/fake_classname_tags123_api.py | 23 - .../python/petstore_api/apis/tags/pet_api.py | 39 - .../petstore_api/apis/tags/store_api.py | 29 - .../python/petstore_api/apis/tags/user_api.py | 37 - .../python/petstore_api/configuration.py | 621 - .../python/petstore_api/exceptions.py | 147 - .../python/petstore_api/model/__init__.py | 5 - .../model/additional_properties_class.py | 307 - .../model/additional_properties_class.pyi | 307 - .../model/additional_properties_validator.py | 198 - .../model/additional_properties_validator.pyi | 196 - ...ditional_properties_with_array_of_enums.py | 84 - ...itional_properties_with_array_of_enums.pyi | 84 - .../python/petstore_api/model/address.py | 57 - .../python/petstore_api/model/address.pyi | 57 - .../python/petstore_api/model/animal.py | 105 - .../python/petstore_api/model/animal.pyi | 105 - .../python/petstore_api/model/animal_farm.py | 56 - .../python/petstore_api/model/animal_farm.pyi | 56 - .../petstore_api/model/any_type_and_format.py | 361 - .../model/any_type_and_format.pyi | 361 - .../petstore_api/model/any_type_not_string.py | 51 - .../model/any_type_not_string.pyi | 51 - .../python/petstore_api/model/api_response.py | 98 - .../petstore_api/model/api_response.pyi | 98 - .../python/petstore_api/model/apple.py | 118 - .../python/petstore_api/model/apple.pyi | 105 - .../python/petstore_api/model/apple_req.py | 84 - .../python/petstore_api/model/apple_req.pyi | 84 - .../model/array_holding_any_type.py | 51 - .../model/array_holding_any_type.pyi | 51 - .../model/array_of_array_of_number_only.py | 122 - .../model/array_of_array_of_number_only.pyi | 122 - .../petstore_api/model/array_of_enums.py | 56 - .../petstore_api/model/array_of_enums.pyi | 56 - .../model/array_of_number_only.py | 100 - .../model/array_of_number_only.pyi | 100 - .../python/petstore_api/model/array_test.py | 213 - .../python/petstore_api/model/array_test.pyi | 213 - .../model/array_with_validations_in_items.py | 61 - .../model/array_with_validations_in_items.pyi | 56 - .../python/petstore_api/model/banana.py | 83 - .../python/petstore_api/model/banana.pyi | 83 - .../python/petstore_api/model/banana_req.py | 84 - .../python/petstore_api/model/banana_req.pyi | 84 - .../petstore/python/petstore_api/model/bar.py | 24 - .../python/petstore_api/model/bar.pyi | 24 - .../python/petstore_api/model/basque_pig.py | 98 - .../python/petstore_api/model/basque_pig.pyi | 92 - .../python/petstore_api/model/boolean.py | 24 - .../python/petstore_api/model/boolean.pyi | 24 - .../python/petstore_api/model/boolean_enum.py | 44 - .../petstore_api/model/boolean_enum.pyi | 38 - .../petstore_api/model/capitalization.py | 128 - .../petstore_api/model/capitalization.pyi | 128 - .../petstore/python/petstore_api/model/cat.py | 117 - .../python/petstore_api/model/cat.pyi | 117 - .../python/petstore_api/model/category.py | 93 - .../python/petstore_api/model/category.pyi | 93 - .../python/petstore_api/model/child_cat.py | 117 - .../python/petstore_api/model/child_cat.pyi | 117 - .../python/petstore_api/model/class_model.py | 81 - .../python/petstore_api/model/class_model.pyi | 81 - .../python/petstore_api/model/client.py | 78 - .../python/petstore_api/model/client.pyi | 78 - .../model/complex_quadrilateral.py | 132 - .../model/complex_quadrilateral.pyi | 126 - ...d_any_of_different_types_no_validations.py | 117 - ..._any_of_different_types_no_validations.pyi | 117 - .../petstore_api/model/composed_array.py | 51 - .../petstore_api/model/composed_array.pyi | 51 - .../petstore_api/model/composed_bool.py | 64 - .../petstore_api/model/composed_bool.pyi | 64 - .../petstore_api/model/composed_none.py | 64 - .../petstore_api/model/composed_none.pyi | 64 - .../petstore_api/model/composed_number.py | 64 - .../petstore_api/model/composed_number.pyi | 64 - .../petstore_api/model/composed_object.py | 66 - .../petstore_api/model/composed_object.pyi | 66 - .../model/composed_one_of_different_types.py | 137 - .../model/composed_one_of_different_types.pyi | 124 - .../petstore_api/model/composed_string.py | 64 - .../petstore_api/model/composed_string.pyi | 64 - .../python/petstore_api/model/currency.py | 49 - .../python/petstore_api/model/currency.pyi | 42 - .../python/petstore_api/model/danish_pig.py | 98 - .../python/petstore_api/model/danish_pig.pyi | 92 - .../petstore_api/model/date_time_test.py | 24 - .../petstore_api/model/date_time_test.pyi | 24 - .../model/date_time_with_validations.py | 40 - .../model/date_time_with_validations.pyi | 34 - .../model/date_with_validations.py | 40 - .../model/date_with_validations.pyi | 34 - .../petstore_api/model/decimal_payload.py | 24 - .../petstore_api/model/decimal_payload.pyi | 24 - .../petstore/python/petstore_api/model/dog.py | 117 - .../python/petstore_api/model/dog.pyi | 117 - .../python/petstore_api/model/drawing.py | 149 - .../python/petstore_api/model/drawing.pyi | 149 - .../python/petstore_api/model/enum_arrays.py | 150 - .../python/petstore_api/model/enum_arrays.pyi | 136 - .../python/petstore_api/model/enum_class.py | 64 - .../python/petstore_api/model/enum_class.pyi | 54 - .../python/petstore_api/model/enum_test.py | 276 - .../python/petstore_api/model/enum_test.pyi | 244 - .../model/equilateral_triangle.py | 132 - .../model/equilateral_triangle.pyi | 126 - .../python/petstore_api/model/file.py | 80 - .../python/petstore_api/model/file.pyi | 80 - .../model/file_schema_test_class.py | 118 - .../model/file_schema_test_class.pyi | 118 - .../petstore/python/petstore_api/model/foo.py | 78 - .../python/petstore_api/model/foo.pyi | 78 - .../python/petstore_api/model/format_test.py | 406 - .../python/petstore_api/model/format_test.pyi | 354 - .../python/petstore_api/model/from_schema.py | 88 - .../python/petstore_api/model/from_schema.pyi | 88 - .../python/petstore_api/model/fruit.py | 97 - .../python/petstore_api/model/fruit.pyi | 97 - .../python/petstore_api/model/fruit_req.py | 70 - .../python/petstore_api/model/fruit_req.pyi | 70 - .../python/petstore_api/model/gm_fruit.py | 97 - .../python/petstore_api/model/gm_fruit.pyi | 97 - .../petstore_api/model/grandparent_animal.py | 95 - .../petstore_api/model/grandparent_animal.pyi | 95 - .../petstore_api/model/has_only_read_only.py | 88 - .../petstore_api/model/has_only_read_only.pyi | 88 - .../petstore_api/model/health_check_result.py | 99 - .../model/health_check_result.pyi | 99 - .../python/petstore_api/model/integer_enum.py | 54 - .../petstore_api/model/integer_enum.pyi | 46 - .../petstore_api/model/integer_enum_big.py | 54 - .../petstore_api/model/integer_enum_big.pyi | 46 - .../model/integer_enum_one_value.py | 44 - .../model/integer_enum_one_value.pyi | 38 - .../model/integer_enum_with_default_value.py | 54 - .../model/integer_enum_with_default_value.pyi | 46 - .../petstore_api/model/integer_max10.py | 38 - .../petstore_api/model/integer_max10.pyi | 34 - .../petstore_api/model/integer_min15.py | 38 - .../petstore_api/model/integer_min15.pyi | 34 - .../petstore_api/model/isosceles_triangle.py | 132 - .../petstore_api/model/isosceles_triangle.pyi | 126 - .../petstore_api/model/json_patch_request.py | 92 - .../petstore_api/model/json_patch_request.pyi | 92 - .../json_patch_request_add_replace_test.py | 123 - .../json_patch_request_add_replace_test.pyi | 115 - .../model/json_patch_request_move_copy.py | 115 - .../model/json_patch_request_move_copy.pyi | 108 - .../model/json_patch_request_remove.py | 101 - .../model/json_patch_request_remove.pyi | 95 - .../python/petstore_api/model/mammal.py | 80 - .../python/petstore_api/model/mammal.pyi | 80 - .../python/petstore_api/model/map_test.py | 245 - .../python/petstore_api/model/map_test.pyi | 238 - ...perties_and_additional_properties_class.py | 131 - ...erties_and_additional_properties_class.pyi | 131 - .../petstore_api/model/model200_response.py | 89 - .../petstore_api/model/model200_response.pyi | 89 - .../python/petstore_api/model/model_return.py | 79 - .../petstore_api/model/model_return.pyi | 79 - .../python/petstore_api/model/money.py | 100 - .../python/petstore_api/model/money.pyi | 100 - .../python/petstore_api/model/name.py | 104 - .../python/petstore_api/model/name.pyi | 104 - .../model/no_additional_properties.py | 84 - .../model/no_additional_properties.pyi | 84 - .../petstore_api/model/nullable_class.py | 576 - .../petstore_api/model/nullable_class.pyi | 576 - .../petstore_api/model/nullable_shape.py | 72 - .../petstore_api/model/nullable_shape.pyi | 72 - .../petstore_api/model/nullable_string.py | 48 - .../petstore_api/model/nullable_string.pyi | 48 - .../python/petstore_api/model/number.py | 24 - .../python/petstore_api/model/number.pyi | 24 - .../python/petstore_api/model/number_only.py | 78 - .../python/petstore_api/model/number_only.pyi | 78 - .../model/number_with_validations.py | 38 - .../model/number_with_validations.pyi | 34 - .../petstore_api/model/object_interface.py | 24 - .../petstore_api/model/object_interface.pyi | 24 - ...ject_model_with_arg_and_args_properties.py | 95 - ...ect_model_with_arg_and_args_properties.pyi | 95 - .../model/object_model_with_ref_props.py | 105 - .../model/object_model_with_ref_props.pyi | 105 - ..._with_req_test_prop_from_unset_add_prop.py | 124 - ...with_req_test_prop_from_unset_add_prop.pyi | 124 - .../model/object_with_decimal_properties.py | 103 - .../model/object_with_decimal_properties.pyi | 103 - .../object_with_difficultly_named_props.py | 98 - .../object_with_difficultly_named_props.pyi | 98 - ...object_with_inline_composition_property.py | 122 - ...bject_with_inline_composition_property.pyi | 119 - ...ect_with_invalid_named_refed_properties.py | 98 - ...ct_with_invalid_named_refed_properties.pyi | 98 - .../model/object_with_optional_test_prop.py | 78 - .../model/object_with_optional_test_prop.pyi | 78 - .../model/object_with_validations.py | 50 - .../model/object_with_validations.pyi | 46 - .../python/petstore_api/model/order.py | 153 - .../python/petstore_api/model/order.pyi | 145 - .../python/petstore_api/model/parent_pet.py | 76 - .../python/petstore_api/model/parent_pet.pyi | 76 - .../petstore/python/petstore_api/model/pet.py | 215 - .../python/petstore_api/model/pet.pyi | 207 - .../petstore/python/petstore_api/model/pig.py | 77 - .../python/petstore_api/model/pig.pyi | 77 - .../python/petstore_api/model/player.py | 93 - .../python/petstore_api/model/player.pyi | 93 - .../petstore_api/model/quadrilateral.py | 77 - .../petstore_api/model/quadrilateral.pyi | 77 - .../model/quadrilateral_interface.py | 111 - .../model/quadrilateral_interface.pyi | 105 - .../petstore_api/model/read_only_first.py | 88 - .../petstore_api/model/read_only_first.pyi | 88 - .../petstore_api/model/scalene_triangle.py | 132 - .../petstore_api/model/scalene_triangle.pyi | 126 - .../python/petstore_api/model/shape.py | 77 - .../python/petstore_api/model/shape.pyi | 77 - .../petstore_api/model/shape_or_null.py | 81 - .../petstore_api/model/shape_or_null.pyi | 81 - .../model/simple_quadrilateral.py | 132 - .../model/simple_quadrilateral.pyi | 126 - .../python/petstore_api/model/some_object.py | 66 - .../python/petstore_api/model/some_object.pyi | 66 - .../petstore_api/model/special_model_name.py | 80 - .../petstore_api/model/special_model_name.pyi | 80 - .../python/petstore_api/model/string.py | 24 - .../python/petstore_api/model/string.pyi | 24 - .../petstore_api/model/string_boolean_map.py | 57 - .../petstore_api/model/string_boolean_map.pyi | 57 - .../python/petstore_api/model/string_enum.py | 89 - .../python/petstore_api/model/string_enum.pyi | 89 - .../model/string_enum_with_default_value.py | 54 - .../model/string_enum_with_default_value.pyi | 46 - .../model/string_with_validation.py | 37 - .../model/string_with_validation.pyi | 34 - .../petstore/python/petstore_api/model/tag.py | 88 - .../python/petstore_api/model/tag.pyi | 88 - .../python/petstore_api/model/triangle.py | 80 - .../python/petstore_api/model/triangle.pyi | 80 - .../petstore_api/model/triangle_interface.py | 111 - .../petstore_api/model/triangle_interface.pyi | 105 - .../python/petstore_api/model/user.py | 241 - .../python/petstore_api/model/user.pyi | 241 - .../python/petstore_api/model/uuid_string.py | 38 - .../python/petstore_api/model/uuid_string.pyi | 34 - .../python/petstore_api/model/whale.py | 118 - .../python/petstore_api/model/whale.pyi | 112 - .../python/petstore_api/model/zebra.py | 132 - .../python/petstore_api/model/zebra.pyi | 118 - .../python/petstore_api/models/__init__.py | 135 - .../python/petstore_api/paths/__init__.py | 56 - .../paths/another_fake_dummy/__init__.py | 7 - .../paths/another_fake_dummy/patch.py | 333 - .../paths/another_fake_dummy/patch.pyi | 328 - .../petstore_api/paths/fake/__init__.py | 7 - .../python/petstore_api/paths/fake/delete.py | 354 - .../python/petstore_api/paths/fake/delete.pyi | 346 - .../python/petstore_api/paths/fake/get.py | 786 -- .../python/petstore_api/paths/fake/get.pyi | 719 - .../python/petstore_api/paths/fake/patch.py | 333 - .../python/petstore_api/paths/fake/patch.pyi | 328 - .../python/petstore_api/paths/fake/post.py | 583 - .../python/petstore_api/paths/fake/post.pyi | 534 - .../__init__.py | 7 - .../get.py | 330 - .../get.pyi | 325 - .../fake_body_with_file_schema/__init__.py | 7 - .../paths/fake_body_with_file_schema/put.py | 302 - .../paths/fake_body_with_file_schema/put.pyi | 297 - .../fake_body_with_query_params/__init__.py | 7 - .../paths/fake_body_with_query_params/put.py | 360 - .../paths/fake_body_with_query_params/put.pyi | 355 - .../fake_case_sensitive_params/__init__.py | 7 - .../paths/fake_case_sensitive_params/put.py | 280 - .../paths/fake_case_sensitive_params/put.pyi | 275 - .../paths/fake_classname_test/__init__.py | 7 - .../paths/fake_classname_test/patch.py | 337 - .../paths/fake_classname_test/patch.pyi | 329 - .../paths/fake_delete_coffee_id/__init__.py | 7 - .../paths/fake_delete_coffee_id/delete.py | 317 - .../paths/fake_delete_coffee_id/delete.pyi | 305 - .../paths/fake_health/__init__.py | 7 - .../petstore_api/paths/fake_health/get.py | 239 - .../petstore_api/paths/fake_health/get.pyi | 234 - .../__init__.py | 7 - .../fake_inline_additional_properties/post.py | 329 - .../post.pyi | 324 - .../fake_inline_composition_/__init__.py | 7 - .../paths/fake_inline_composition_/post.py | 855 -- .../paths/fake_inline_composition_/post.pyi | 832 -- .../paths/fake_json_form_data/__init__.py | 7 - .../paths/fake_json_form_data/get.py | 364 - .../paths/fake_json_form_data/get.pyi | 359 - .../paths/fake_json_patch/__init__.py | 7 - .../paths/fake_json_patch/patch.py | 300 - .../paths/fake_json_patch/patch.pyi | 295 - .../paths/fake_json_with_charset/__init__.py | 7 - .../paths/fake_json_with_charset/post.py | 328 - .../paths/fake_json_with_charset/post.pyi | 323 - .../paths/fake_obj_in_query/__init__.py | 7 - .../paths/fake_obj_in_query/get.py | 309 - .../paths/fake_obj_in_query/get.pyi | 304 - .../__init__.py | 7 - .../post.py | 665 - .../post.pyi | 660 - .../__init__.py | 7 - .../post.py | 455 - .../post.pyi | 447 - .../__init__.py | 7 - .../get.py | 292 - .../get.pyi | 287 - .../paths/fake_ref_obj_in_query/__init__.py | 7 - .../paths/fake_ref_obj_in_query/get.py | 262 - .../paths/fake_ref_obj_in_query/get.pyi | 257 - .../fake_refs_array_of_enums/__init__.py | 7 - .../paths/fake_refs_array_of_enums/post.py | 330 - .../paths/fake_refs_array_of_enums/post.pyi | 325 - .../paths/fake_refs_arraymodel/__init__.py | 7 - .../paths/fake_refs_arraymodel/post.py | 329 - .../paths/fake_refs_arraymodel/post.pyi | 324 - .../paths/fake_refs_boolean/__init__.py | 7 - .../paths/fake_refs_boolean/post.py | 327 - .../paths/fake_refs_boolean/post.pyi | 322 - .../__init__.py | 7 - .../post.py | 329 - .../post.pyi | 324 - .../paths/fake_refs_enum/__init__.py | 7 - .../petstore_api/paths/fake_refs_enum/post.py | 329 - .../paths/fake_refs_enum/post.pyi | 324 - .../paths/fake_refs_mammal/__init__.py | 7 - .../paths/fake_refs_mammal/post.py | 332 - .../paths/fake_refs_mammal/post.pyi | 327 - .../paths/fake_refs_number/__init__.py | 7 - .../paths/fake_refs_number/post.py | 329 - .../paths/fake_refs_number/post.pyi | 324 - .../__init__.py | 7 - .../post.py | 329 - .../post.pyi | 324 - .../paths/fake_refs_string/__init__.py | 7 - .../paths/fake_refs_string/post.py | 327 - .../paths/fake_refs_string/post.pyi | 322 - .../fake_response_without_schema/__init__.py | 7 - .../paths/fake_response_without_schema/get.py | 238 - .../fake_response_without_schema/get.pyi | 233 - .../fake_test_query_parameters/__init__.py | 7 - .../paths/fake_test_query_parameters/put.py | 419 - .../paths/fake_test_query_parameters/put.pyi | 414 - .../fake_upload_download_file/__init__.py | 7 - .../paths/fake_upload_download_file/post.py | 331 - .../paths/fake_upload_download_file/post.pyi | 326 - .../paths/fake_upload_file/__init__.py | 7 - .../paths/fake_upload_file/post.py | 394 - .../paths/fake_upload_file/post.pyi | 389 - .../paths/fake_upload_files/__init__.py | 7 - .../paths/fake_upload_files/post.py | 401 - .../paths/fake_upload_files/post.pyi | 396 - .../python/petstore_api/paths/foo/__init__.py | 7 - .../python/petstore_api/paths/foo/get.py | 294 - .../python/petstore_api/paths/foo/get.pyi | 289 - .../python/petstore_api/paths/pet/__init__.py | 7 - .../python/petstore_api/paths/pet/post.py | 393 - .../python/petstore_api/paths/pet/post.pyi | 373 - .../python/petstore_api/paths/pet/put.py | 376 - .../python/petstore_api/paths/pet/put.pyi | 355 - .../paths/pet_find_by_status/__init__.py | 7 - .../paths/pet_find_by_status/get.py | 413 - .../paths/pet_find_by_status/get.pyi | 395 - .../paths/pet_find_by_tags/__init__.py | 7 - .../paths/pet_find_by_tags/get.py | 388 - .../paths/pet_find_by_tags/get.pyi | 378 - .../petstore_api/paths/pet_pet_id/__init__.py | 7 - .../petstore_api/paths/pet_pet_id/delete.py | 304 - .../petstore_api/paths/pet_pet_id/delete.pyi | 296 - .../petstore_api/paths/pet_pet_id/get.py | 328 - .../petstore_api/paths/pet_pet_id/get.pyi | 318 - .../petstore_api/paths/pet_pet_id/post.py | 397 - .../petstore_api/paths/pet_pet_id/post.pyi | 389 - .../paths/pet_pet_id_upload_image/__init__.py | 7 - .../paths/pet_pet_id_upload_image/post.py | 450 - .../paths/pet_pet_id_upload_image/post.pyi | 442 - .../paths/store_inventory/__init__.py | 7 - .../petstore_api/paths/store_inventory/get.py | 269 - .../paths/store_inventory/get.pyi | 261 - .../paths/store_order/__init__.py | 7 - .../petstore_api/paths/store_order/post.py | 351 - .../petstore_api/paths/store_order/post.pyi | 345 - .../paths/store_order_order_id/__init__.py | 7 - .../paths/store_order_order_id/delete.py | 261 - .../paths/store_order_order_id/delete.pyi | 255 - .../paths/store_order_order_id/get.py | 334 - .../paths/store_order_order_id/get.pyi | 322 - .../petstore_api/paths/user/__init__.py | 7 - .../python/petstore_api/paths/user/post.py | 307 - .../python/petstore_api/paths/user/post.pyi | 302 - .../paths/user_create_with_array/__init__.py | 7 - .../paths/user_create_with_array/post.py | 332 - .../paths/user_create_with_array/post.pyi | 327 - .../paths/user_create_with_list/__init__.py | 7 - .../paths/user_create_with_list/post.py | 332 - .../paths/user_create_with_list/post.pyi | 327 - .../petstore_api/paths/user_login/__init__.py | 7 - .../petstore_api/paths/user_login/get.py | 343 - .../petstore_api/paths/user_login/get.pyi | 327 - .../paths/user_logout/__init__.py | 7 - .../petstore_api/paths/user_logout/get.py | 210 - .../petstore_api/paths/user_logout/get.pyi | 205 - .../paths/user_username/__init__.py | 7 - .../paths/user_username/delete.py | 273 - .../paths/user_username/delete.pyi | 267 - .../petstore_api/paths/user_username/get.py | 324 - .../petstore_api/paths/user_username/get.pyi | 317 - .../petstore_api/paths/user_username/put.py | 352 - .../petstore_api/paths/user_username/put.pyi | 346 - .../petstore/python/petstore_api/rest.py | 257 - .../petstore/python/petstore_api/schemas.py | 2475 ---- .../petstore/python/petstore_api/signing.py | 416 - .../openapi3/client/petstore/python/pom.xml | 46 - .../client/petstore/python/requirements.txt | 8 - .../openapi3/client/petstore/python/setup.cfg | 2 - .../openapi3/client/petstore/python/setup.py | 50 - .../petstore/python/test-requirements.txt | 4 - .../client/petstore/python/test/__init__.py | 0 .../python/test/test_models/__init__.py | 0 .../test_additional_properties_class.py | 25 - .../test_additional_properties_validator.py | 25 - ...ditional_properties_with_array_of_enums.py | 25 - .../python/test/test_models/test_address.py | 25 - .../python/test/test_models/test_animal.py | 25 - .../test/test_models/test_animal_farm.py | 25 - .../test_models/test_any_type_and_format.py | 25 - .../test_models/test_any_type_not_string.py | 25 - .../test/test_models/test_api_response.py | 25 - .../python/test/test_models/test_apple.py | 25 - .../python/test/test_models/test_apple_req.py | 25 - .../test_array_holding_any_type.py | 25 - .../test_array_of_array_of_number_only.py | 25 - .../test/test_models/test_array_of_enums.py | 25 - .../test_models/test_array_of_number_only.py | 25 - .../test/test_models/test_array_test.py | 25 - .../test_array_with_validations_in_items.py | 25 - .../python/test/test_models/test_banana.py | 25 - .../test/test_models/test_banana_req.py | 25 - .../python/test/test_models/test_bar.py | 25 - .../test/test_models/test_basque_pig.py | 25 - .../python/test/test_models/test_boolean.py | 25 - .../test/test_models/test_boolean_enum.py | 25 - .../test/test_models/test_capitalization.py | 25 - .../python/test/test_models/test_cat.py | 25 - .../python/test/test_models/test_category.py | 25 - .../python/test/test_models/test_child_cat.py | 25 - .../test/test_models/test_class_model.py | 25 - .../python/test/test_models/test_client.py | 25 - .../test_models/test_complex_quadrilateral.py | 25 - ...d_any_of_different_types_no_validations.py | 25 - .../test/test_models/test_composed_array.py | 25 - .../test/test_models/test_composed_bool.py | 25 - .../test/test_models/test_composed_none.py | 25 - .../test/test_models/test_composed_number.py | 25 - .../test/test_models/test_composed_object.py | 25 - .../test_composed_one_of_different_types.py | 25 - .../test/test_models/test_composed_string.py | 25 - .../python/test/test_models/test_currency.py | 25 - .../test/test_models/test_danish_pig.py | 25 - .../test/test_models/test_date_time_test.py | 25 - .../test_date_time_with_validations.py | 25 - .../test_models/test_date_with_validations.py | 25 - .../test/test_models/test_decimal_payload.py | 25 - .../python/test/test_models/test_dog.py | 25 - .../python/test/test_models/test_drawing.py | 25 - .../test/test_models/test_enum_arrays.py | 25 - .../test/test_models/test_enum_class.py | 25 - .../python/test/test_models/test_enum_test.py | 25 - .../test_models/test_equilateral_triangle.py | 25 - .../python/test/test_models/test_file.py | 25 - .../test_file_schema_test_class.py | 25 - .../python/test/test_models/test_foo.py | 25 - .../test/test_models/test_format_test.py | 25 - .../test/test_models/test_from_schema.py | 25 - .../python/test/test_models/test_fruit.py | 25 - .../python/test/test_models/test_fruit_req.py | 25 - .../python/test/test_models/test_gm_fruit.py | 25 - .../test_models/test_grandparent_animal.py | 25 - .../test_models/test_has_only_read_only.py | 25 - .../test_models/test_health_check_result.py | 25 - .../test/test_models/test_integer_enum.py | 25 - .../test/test_models/test_integer_enum_big.py | 25 - .../test_integer_enum_one_value.py | 25 - .../test_integer_enum_with_default_value.py | 25 - .../test/test_models/test_integer_max10.py | 25 - .../test/test_models/test_integer_min15.py | 25 - .../test_models/test_isosceles_triangle.py | 25 - .../test_models/test_json_patch_request.py | 25 - ...est_json_patch_request_add_replace_test.py | 25 - .../test_json_patch_request_move_copy.py | 25 - .../test_json_patch_request_remove.py | 25 - .../python/test/test_models/test_mammal.py | 25 - .../python/test/test_models/test_map_test.py | 25 - ...perties_and_additional_properties_class.py | 25 - .../test_models/test_model200_response.py | 25 - .../test/test_models/test_model_return.py | 25 - .../python/test/test_models/test_money.py | 25 - .../python/test/test_models/test_name.py | 25 - .../test_no_additional_properties.py | 25 - .../test/test_models/test_nullable_class.py | 25 - .../test/test_models/test_nullable_shape.py | 25 - .../test/test_models/test_nullable_string.py | 25 - .../python/test/test_models/test_number.py | 25 - .../test/test_models/test_number_only.py | 25 - .../test_number_with_validations.py | 25 - .../test/test_models/test_object_interface.py | 25 - ...ject_model_with_arg_and_args_properties.py | 25 - .../test_object_model_with_ref_props.py | 25 - ..._with_req_test_prop_from_unset_add_prop.py | 25 - .../test_object_with_decimal_properties.py | 25 - ...est_object_with_difficultly_named_props.py | 25 - ...object_with_inline_composition_property.py | 25 - ...ect_with_invalid_named_refed_properties.py | 25 - .../test_object_with_optional_test_prop.py | 25 - .../test_object_with_validations.py | 25 - .../python/test/test_models/test_order.py | 25 - .../test/test_models/test_parent_pet.py | 25 - .../python/test/test_models/test_pet.py | 25 - .../python/test/test_models/test_pig.py | 25 - .../python/test/test_models/test_player.py | 25 - .../test/test_models/test_quadrilateral.py | 25 - .../test_quadrilateral_interface.py | 25 - .../test/test_models/test_read_only_first.py | 25 - .../test/test_models/test_scalene_triangle.py | 25 - .../python/test/test_models/test_shape.py | 25 - .../test/test_models/test_shape_or_null.py | 25 - .../test_models/test_simple_quadrilateral.py | 25 - .../test/test_models/test_some_object.py | 25 - .../test_models/test_special_model_name.py | 25 - .../python/test/test_models/test_string.py | 25 - .../test_models/test_string_boolean_map.py | 25 - .../test/test_models/test_string_enum.py | 25 - .../test_string_enum_with_default_value.py | 25 - .../test_string_with_validation.py | 25 - .../python/test/test_models/test_tag.py | 25 - .../python/test/test_models/test_triangle.py | 25 - .../test_models/test_triangle_interface.py | 25 - .../python/test/test_models/test_user.py | 25 - .../test/test_models/test_uuid_string.py | 25 - .../python/test/test_models/test_whale.py | 25 - .../python/test/test_models/test_zebra.py | 25 - .../python/test/test_paths/__init__.py | 68 - .../test_another_fake_dummy/__init__.py | 0 .../test_another_fake_dummy/test_patch.py | 43 - .../test/test_paths/test_fake/__init__.py | 0 .../test/test_paths/test_fake/test_delete.py | 40 - .../test/test_paths/test_fake/test_get.py | 40 - .../test/test_paths/test_fake/test_patch.py | 43 - .../test/test_paths/test_fake/test_post.py | 40 - .../__init__.py | 0 .../test_get.py | 41 - .../__init__.py | 0 .../test_put.py | 41 - .../__init__.py | 0 .../test_put.py | 41 - .../__init__.py | 0 .../test_put.py | 39 - .../test_fake_classname_test/__init__.py | 0 .../test_fake_classname_test/test_patch.py | 43 - .../test_fake_delete_coffee_id/__init__.py | 0 .../test_fake_delete_coffee_id/test_delete.py | 40 - .../test_paths/test_fake_health/__init__.py | 0 .../test_paths/test_fake_health/test_get.py | 41 - .../__init__.py | 0 .../test_post.py | 42 - .../test_fake_inline_composition_/__init__.py | 0 .../test_post.py | 43 - .../test_fake_json_form_data/__init__.py | 0 .../test_fake_json_form_data/test_get.py | 40 - .../test_fake_json_patch/__init__.py | 0 .../test_fake_json_patch/test_patch.py | 40 - .../test_fake_json_with_charset/__init__.py | 0 .../test_fake_json_with_charset/test_post.py | 41 - .../test_fake_obj_in_query/__init__.py | 0 .../test_fake_obj_in_query/test_get.py | 40 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_post.py | 41 - .../__init__.py | 0 .../test_get.py | 41 - .../test_fake_ref_obj_in_query/__init__.py | 0 .../test_fake_ref_obj_in_query/test_get.py | 40 - .../test_fake_refs_array_of_enums/__init__.py | 0 .../test_post.py | 41 - .../test_fake_refs_arraymodel/__init__.py | 0 .../test_fake_refs_arraymodel/test_post.py | 40 - .../test_fake_refs_boolean/__init__.py | 0 .../test_fake_refs_boolean/test_post.py | 40 - .../__init__.py | 0 .../test_post.py | 40 - .../test_fake_refs_enum/__init__.py | 0 .../test_fake_refs_enum/test_post.py | 40 - .../test_fake_refs_mammal/__init__.py | 0 .../test_fake_refs_mammal/test_post.py | 42 - .../test_fake_refs_number/__init__.py | 0 .../test_fake_refs_number/test_post.py | 40 - .../__init__.py | 0 .../test_post.py | 40 - .../test_fake_refs_string/__init__.py | 0 .../test_fake_refs_string/test_post.py | 40 - .../__init__.py | 0 .../test_get.py | 43 - .../__init__.py | 0 .../test_put.py | 39 - .../__init__.py | 0 .../test_post.py | 43 - .../test_fake_upload_file/__init__.py | 0 .../test_fake_upload_file/test_post.py | 41 - .../test_fake_upload_files/__init__.py | 0 .../test_fake_upload_files/test_post.py | 41 - .../test/test_paths/test_foo/__init__.py | 0 .../test/test_paths/test_foo/test_get.py | 40 - .../test/test_paths/test_pet/__init__.py | 0 .../test/test_paths/test_pet/test_post.py | 44 - .../test/test_paths/test_pet/test_put.py | 44 - .../test_pet_find_by_status/__init__.py | 0 .../test_pet_find_by_status/test_get.py | 43 - .../test_pet_find_by_tags/__init__.py | 0 .../test_pet_find_by_tags/test_get.py | 43 - .../test_paths/test_pet_pet_id/__init__.py | 0 .../test_paths/test_pet_pet_id/test_delete.py | 40 - .../test_paths/test_pet_pet_id/test_get.py | 43 - .../test_paths/test_pet_pet_id/test_post.py | 40 - .../test_pet_pet_id_upload_image/__init__.py | 0 .../test_pet_pet_id_upload_image/test_post.py | 41 - .../test_store_inventory/__init__.py | 0 .../test_store_inventory/test_get.py | 41 - .../test_paths/test_store_order/__init__.py | 0 .../test_paths/test_store_order/test_post.py | 45 - .../test_store_order_order_id/__init__.py | 0 .../test_store_order_order_id/test_delete.py | 40 - .../test_store_order_order_id/test_get.py | 43 - .../test/test_paths/test_user/__init__.py | 0 .../test/test_paths/test_user/test_post.py | 42 - .../test_user_create_with_array/__init__.py | 0 .../test_user_create_with_array/test_post.py | 42 - .../test_user_create_with_list/__init__.py | 0 .../test_user_create_with_list/test_post.py | 42 - .../test_paths/test_user_login/__init__.py | 0 .../test_paths/test_user_login/test_get.py | 43 - .../test_paths/test_user_logout/__init__.py | 0 .../test_paths/test_user_logout/test_get.py | 40 - .../test_paths/test_user_username/__init__.py | 0 .../test_user_username/test_delete.py | 40 - .../test_paths/test_user_username/test_get.py | 43 - .../test_paths/test_user_username/test_put.py | 42 - .../client/petstore/python/test_python.sh | 33 - .../petstore/python/testfiles/1px_pic1.png | Bin 67 -> 0 bytes .../petstore/python/testfiles/1px_pic2.png | Bin 67 -> 0 bytes .../petstore/python/tests_manual/__init__.py | 110 - .../test_additional_properties_class.py | 35 - .../test_additional_properties_validator.py | 39 - .../python/tests_manual/test_animal.py | 96 - .../tests_manual/test_any_type_and_format.py | 237 - .../tests_manual/test_any_type_not_string.py | 40 - .../tests_manual/test_any_type_schema.py | 230 - .../test_array_holding_any_type.py | 64 - .../test_array_with_validations_in_items.py | 52 - .../python/tests_manual/test_boolean_enum.py | 40 - .../test_combine_object_schemas.py | 152 - .../tests_manual/test_combine_schemas.py | 74 - .../python/tests_manual/test_composed_bool.py | 49 - .../python/tests_manual/test_composed_none.py | 42 - .../tests_manual/test_composed_number.py | 42 - .../tests_manual/test_composed_object.py | 42 - .../test_composed_one_of_different_types.py | 108 - .../tests_manual/test_composed_string.py | 42 - .../python/tests_manual/test_configuration.py | 67 - .../test_date_time_with_validations.py | 88 - .../test_date_with_validations.py | 92 - .../tests_manual/test_decimal_payload.py | 46 - .../tests_manual/test_deserialization.py | 458 - .../test_discard_unknown_properties.py | 157 - .../python/tests_manual/test_drawing.py | 165 - .../test_extra_pool_config_options.py | 61 - .../python/tests_manual/test_fake_api.py | 834 -- .../python/tests_manual/test_format_test.py | 137 - .../python/tests_manual/test_fruit.py | 134 - .../python/tests_manual/test_fruit_req.py | 120 - .../python/tests_manual/test_gm_fruit.py | 122 - .../tests_manual/test_http_signature.py | 518 - .../test_integer_enum_one_value.py | 55 - .../python/tests_manual/test_json_encoder.py | 50 - .../python/tests_manual/test_mammal.py | 55 - .../python/tests_manual/test_money.py | 34 - .../test_no_additional_properties.py | 73 - .../tests_manual/test_nullable_string.py | 55 - .../test_number_with_validations.py | 46 - ...ject_model_with_arg_and_args_properties.py | 41 - .../test_object_model_with_ref_props.py | 46 - ..._with_req_test_prop_from_unset_add_prop.py | 34 - ...est_object_with_difficultly_named_props.py | 37 - ...object_with_inline_composition_property.py | 38 - ...ect_with_invalid_named_refed_properties.py | 77 - .../test_object_with_validations.py | 52 - .../python/tests_manual/test_parameters.py | 1063 -- .../python/tests_manual/test_parent_pet.py | 42 - .../tests_manual/test_paths/__init__.py | 0 .../test_paths/test_fake/__init__.py | 0 .../test_paths/test_fake/test_get.py | 111 - .../__init__.py | 0 .../test_get.py | 106 - .../test_paths/test_pet_pet_id/__init__.py | 0 .../test_paths/test_pet_pet_id/test_get.py | 65 - .../test_paths/test_pet_pet_id/test_post.py | 60 - .../petstore/python/tests_manual/test_pet.py | 37 - .../python/tests_manual/test_quadrilateral.py | 40 - .../python/tests_manual/test_request_body.py | 179 - .../python/tests_manual/test_shape.py | 118 - .../python/tests_manual/test_string_enum.py | 57 - .../python/tests_manual/test_triangle.py | 39 - .../python/tests_manual/test_user_api.py | 108 - .../python/tests_manual/test_uuid_string.py | 48 - .../python/tests_manual/test_validate.py | 286 - .../python/tests_manual/test_whale.py | 49 - .../petstore/python/tests_manual/util.py | 8 - .../openapi3/client/petstore/python/tox.ini | 10 - 2460 files changed, 7 insertions(+), 307868 deletions(-) delete mode 100644 bin/configs/python-features-dynamic-servers.yaml delete mode 100644 bin/configs/python.yaml delete mode 100644 bin/configs/python_3_0_3_unit_test.yaml delete mode 100644 modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java delete mode 100644 modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.gitignore delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.gitlab-ci.yml delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator-ignore delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/.travis.yml delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/Makefile delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/README.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AdditionalPropertiesApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AllOfApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AnyOfApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ContentTypeJsonApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/DefaultApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/EnumApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/FormatApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ItemsApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxItemsApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxLengthApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxPropertiesApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaximumApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinItemsApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinLengthApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinPropertiesApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinimumApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ModelNotApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MultipleOfApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OneOfApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OperationRequestBodyApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PathPostApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PatternApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PropertiesApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RefApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RequiredApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ResponseContentContentTypeSchemaApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/TypeApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/UniqueItemsApi.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAreAllowedByDefault.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesCanExistByItself.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesShouldNotLookInApplicators.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Allof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofCombinedWithAnyofOneof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofSimpleTypes.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithBaseSchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithOneEmptySchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheFirstEmptySchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheLastEmptySchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTwoEmptySchemas.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Anyof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofComplexTypes.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithBaseSchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithOneEmptySchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ArrayTypeMatchesArrays.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/BooleanTypeMatchesBooleans.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByInt.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByNumber.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/BySmallNumber.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/DateTimeFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EmailFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith0DoesNotMatchFalse.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith1DoesNotMatchTrue.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithEscapedCharacters.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithFalseDoesNotMatch0.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithTrueDoesNotMatch1.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumsInProperties.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ForbiddenProperty.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/HostnameFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/IntegerTypeMatchesIntegers.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidStringValueForDefault.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv4Format.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv6Format.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/JsonPointerFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidationWithUnsignedInteger.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxitemsValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxlengthValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Maxproperties0MeansTheObjectIsEmpty.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxpropertiesValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidationWithSignedInteger.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinitemsValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinlengthValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinpropertiesValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ModelNot.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAllofToCheckValidationSemantics.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAnyofToCheckValidationSemantics.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedItems.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedOneofToCheckValidationSemantics.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NotMoreComplexSchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NulCharactersInStrings.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NullTypeMatchesOnlyTheNullObject.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/NumberTypeMatchesNumbers.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectPropertiesValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/Oneof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofComplexTypes.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithBaseSchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithEmptySchema.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithRequired.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternIsNotAnchored.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertiesWithEscapedCharacters.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertyNamedRefThatIsNotAReference.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAdditionalproperties.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAllof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAnyof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInItems.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInNot.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInOneof.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInProperty.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredDefaultValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEmptyArray.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEscapedCharacters.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/SimpleEnumValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/StringTypeMatchesStrings.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsFalseValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsValidation.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriReferenceFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriTemplateFormat.md delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/git_push.sh delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/pom.xml delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/requirements.txt delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/setup.cfg delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/setup.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_allows_a_schema_which_should_validate.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_are_allowed_by_default.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_can_exist_by_itself.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_should_not_look_in_applicators.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_combined_with_anyof_oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_simple_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_one_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_first_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_last_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_two_empty_schemas.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_complex_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_one_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_array_type_matches_arrays.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_boolean_type_matches_booleans.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_int.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_number.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_small_number.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_date_time_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_email_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with0_does_not_match_false.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with1_does_not_match_true.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_false_does_not_match0.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_true_does_not_match1.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enums_in_properties.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_forbidden_property.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_hostname_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_integer_type_matches_integers.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_instance_should_not_raise_error_when_float_division_inf.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_string_value_for_default.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv4_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv6_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_json_pointer_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation_with_unsigned_integer.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxlength_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties0_means_the_object_is_empty.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation_with_signed_integer.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minlength_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minproperties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_model_not.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_allof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_anyof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_items.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_oneof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_not_more_complex_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nul_characters_in_strings.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_null_type_matches_only_the_null_object.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_number_type_matches_numbers.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_complex_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_required.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_is_not_anchored.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_properties_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_property_named_ref_that_is_not_a_reference.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_additionalproperties.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_allof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_anyof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_items.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_not.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_property.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_default_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_empty_array.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_simple_enum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_string_type_matches_strings.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_false_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_reference_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_template_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py delete mode 100755 samples/openapi3/client/3_0_3_unit_test/python/test_python.sh delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/tox.ini delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/path_to_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_int_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_number_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_email_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tag_to_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/additional_properties_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/all_of_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/any_of_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/content_type_json_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/default_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/enum_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/format_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/items_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_items_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_length_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_properties_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/maximum_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_items_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_length_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_properties_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/minimum_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/model_not_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/multiple_of_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/one_of_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/operation_request_body_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/path_post_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/pattern_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/properties_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/ref_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/required_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/response_content_content_type_schema_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/type_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/unique_items_api.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/rest.py delete mode 100644 samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.gitignore delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.gitlab-ci.yml delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.openapi-generator-ignore delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/FILES delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/.travis.yml delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/README.md delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/docs/UsageApi.md delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/docs/apis/tags/UsageApi.md delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/path_to_api.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/custom.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/default.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tag_to_api.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/usage_api.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/rest.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/git_push.sh delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/requirements.txt delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/setup.cfg delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/setup.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test-requirements.txt delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_models/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_paths/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/test_get.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/__init__.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/test_get.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/test/test_usage_api.py delete mode 100644 samples/openapi3/client/features/dynamic-servers/python/tox.ini delete mode 100644 samples/openapi3/client/petstore/python/.gitignore delete mode 100644 samples/openapi3/client/petstore/python/.gitlab-ci.yml delete mode 100644 samples/openapi3/client/petstore/python/.openapi-generator-ignore delete mode 100644 samples/openapi3/client/petstore/python/.openapi-generator/FILES delete mode 100644 samples/openapi3/client/petstore/python/.openapi-generator/VERSION delete mode 100644 samples/openapi3/client/petstore/python/.travis.yml delete mode 100644 samples/openapi3/client/petstore/python/Makefile delete mode 100644 samples/openapi3/client/petstore/python/README.md delete mode 100644 samples/openapi3/client/petstore/python/dev-requirements.txt delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesClass.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesValidator.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesWithArrayOfEnums.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Address.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Animal.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AnimalFarm.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AnyTypeAndFormat.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AnyTypeNotString.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ApiResponse.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Apple.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/AppleReq.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayHoldingAnyType.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayOfArrayOfNumberOnly.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayOfEnums.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayOfNumberOnly.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ArrayWithValidationsInItems.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Banana.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/BananaReq.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Bar.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/BasquePig.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Boolean.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/BooleanEnum.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Capitalization.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Cat.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Category.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ChildCat.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ClassModel.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Client.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComplexQuadrilateral.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedAnyOfDifferentTypesNoValidations.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedArray.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedBool.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedNone.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedNumber.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedObject.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedOneOfDifferentTypes.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ComposedString.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Currency.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/DanishPig.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/DateTimeTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/DateTimeWithValidations.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/DateWithValidations.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/DecimalPayload.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Dog.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Drawing.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/EnumArrays.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/EnumClass.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/EnumTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/EquilateralTriangle.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/File.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/FileSchemaTestClass.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Foo.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/FormatTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/FromSchema.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Fruit.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/FruitReq.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/GmFruit.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/GrandparentAnimal.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/HasOnlyReadOnly.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/HealthCheckResult.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerEnum.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerEnumBig.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerEnumOneValue.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerEnumWithDefaultValue.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerMax10.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IntegerMin15.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/IsoscelesTriangle.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/JSONPatchRequest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestAddReplaceTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestMoveCopy.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestRemove.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Mammal.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/MapTest.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Model200Response.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ModelReturn.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Money.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Name.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NoAdditionalProperties.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NullableClass.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NullableShape.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NullableString.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Number.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NumberOnly.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/NumberWithValidations.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectInterface.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithDifficultlyNamedProps.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithInlineCompositionProperty.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithOptionalTestProp.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ObjectWithValidations.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Order.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ParentPet.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Pet.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Pig.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Player.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Quadrilateral.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/QuadrilateralInterface.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ReadOnlyFirst.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ScaleneTriangle.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Shape.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/ShapeOrNull.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/SimpleQuadrilateral.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/SomeObject.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/SpecialModelName.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/String.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/StringBooleanMap.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/StringEnum.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/StringEnumWithDefaultValue.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/StringWithValidation.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Tag.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Triangle.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/TriangleInterface.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/UUIDString.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/User.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Whale.md delete mode 100644 samples/openapi3/client/petstore/python/docs/models/Zebra.md delete mode 100644 samples/openapi3/client/petstore/python/git_push.sh delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/api_client.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/another_fake_dummy.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_file_schema.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_query_params.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_case_sensitive_params.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_classname_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_delete_coffee_id.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_health.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_additional_properties.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_composition_.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_form_data.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_patch.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_with_charset.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_obj_in_query.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_ref_obj_in_query.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_arraymodel.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_boolean.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_enum.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_mammal.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_number.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_response_without_schema.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_download_file.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_file.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_files.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/foo.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_status.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_tags.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id_upload_image.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_inventory.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order_order_id.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_array.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_list.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_login.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_logout.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_username.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tag_to_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/another_fake_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/default_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_classname_tags123_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/pet_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/store_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/apis/tags/user_api.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/configuration.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/exceptions.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/address.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/address.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/animal.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/api_response.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/apple.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/banana.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/bar.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/bar.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/boolean.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/boolean.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/cat.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/category.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/category.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/class_model.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/client.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/client.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/currency.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/currency.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/dog.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/drawing.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_class.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/file.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/file.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/foo.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/format_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/fruit.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/mammal.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/map_test.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/model_return.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/money.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/money.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/name.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/name.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number_only.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_interface.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/order.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/order.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/pet.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/pig.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/player.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/player.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/shape.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/some_object.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/tag.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/triangle.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/user.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/user.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/whale.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/zebra.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/models/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/rest.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/schemas.py delete mode 100644 samples/openapi3/client/petstore/python/petstore_api/signing.py delete mode 100644 samples/openapi3/client/petstore/python/pom.xml delete mode 100644 samples/openapi3/client/petstore/python/requirements.txt delete mode 100644 samples/openapi3/client/petstore/python/setup.cfg delete mode 100644 samples/openapi3/client/petstore/python/setup.py delete mode 100644 samples/openapi3/client/petstore/python/test-requirements.txt delete mode 100644 samples/openapi3/client/petstore/python/test/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_class.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_validator.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_with_array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_address.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_animal.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_animal_farm.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_any_type_and_format.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_any_type_not_string.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_api_response.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_apple.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_apple_req.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_holding_any_type.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_of_array_of_number_only.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_of_enums.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_of_number_only.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_array_with_validations_in_items.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_banana.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_banana_req.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_bar.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_basque_pig.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_boolean.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_boolean_enum.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_capitalization.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_cat.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_category.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_child_cat.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_class_model.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_client.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_complex_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_any_of_different_types_no_validations.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_array.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_bool.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_none.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_number.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_object.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_one_of_different_types.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_composed_string.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_currency.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_danish_pig.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_date_time_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_date_time_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_date_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_decimal_payload.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_dog.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_drawing.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_enum_arrays.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_enum_class.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_enum_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_equilateral_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_file.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_file_schema_test_class.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_foo.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_format_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_fruit.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_fruit_req.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_gm_fruit.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_grandparent_animal.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_has_only_read_only.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_health_check_result.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_enum.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_big.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_one_value.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_with_default_value.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_max10.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_integer_min15.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_isosceles_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_add_replace_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_move_copy.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_remove.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_mammal.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_map_test.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_mixed_properties_and_additional_properties_class.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_model200_response.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_model_return.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_money.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_name.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_no_additional_properties.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_nullable_class.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_nullable_shape.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_nullable_string.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_number.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_number_only.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_number_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_interface.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_ref_props.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_decimal_properties.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_difficultly_named_props.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_inline_composition_property.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_optional_test_prop.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_object_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_order.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_parent_pet.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_pet.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_pig.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_player.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral_interface.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_read_only_first.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_scalene_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_shape.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_shape_or_null.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_simple_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_some_object.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_special_model_name.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_string.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_string_boolean_map.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_string_enum.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_string_enum_with_default_value.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_string_with_validation.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_tag.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_triangle_interface.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_user.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_uuid_string.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_whale.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_models/test_zebra.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/test_patch.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_patch.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/test_put.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/test_put.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/test_put.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/test_patch.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/test_delete.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/test_patch.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_foo/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_foo/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_put.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_delete.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_order/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_order/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_delete.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_login/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_login/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_username/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_put.py delete mode 100755 samples/openapi3/client/petstore/python/test_python.sh delete mode 100644 samples/openapi3/client/petstore/python/testfiles/1px_pic1.png delete mode 100644 samples/openapi3/client/petstore/python/testfiles/1px_pic2.png delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_animal.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_any_type_not_string.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_array_holding_any_type.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_boolean_enum.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_combine_object_schemas.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_bool.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_none.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_number.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_object.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_composed_string.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_configuration.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_decimal_payload.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_drawing.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_extra_pool_config_options.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_format_test.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_fruit.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_integer_enum_one_value.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_mammal.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_money.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_nullable_string.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_parameters.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_post.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_pet.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_request_body.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_shape.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_string_enum.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_triangle.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_user_api.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_uuid_string.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_validate.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/test_whale.py delete mode 100644 samples/openapi3/client/petstore/python/tests_manual/util.py delete mode 100644 samples/openapi3/client/petstore/python/tox.ini diff --git a/CI/circle_parallel.sh b/CI/circle_parallel.sh index f75000c7690..dc60d85ae08 100755 --- a/CI/circle_parallel.sh +++ b/CI/circle_parallel.sh @@ -54,7 +54,7 @@ elif [ "$NODE_INDEX" = "3" ]; then #sudo make altinstall pyenv install --list pyenv install 3.7.12 - pyenv install 2.7.14 + #pyenv install 2.7.14 #python2 no longer supported pyenv global 3.7.12 # Install node@stable (for angular 6) @@ -78,10 +78,10 @@ elif [ "$NODE_INDEX" = "4" ]; then echo "Running node $NODE_INDEX to test 'samples.circleci.node4' defined in pom.xml ..." #mvn --no-snapshot-updates --quiet verify -Psamples.circleci.node4 -Dorg.slf4j.simpleLogger.defaultLogLevel=error - (cd samples/openapi3/client/petstore/python && make test) + #(cd samples/openapi3/client/petstore/python && make test) # comment out due to ModuleNotFoundError: No module named 'urllib3.request' #(cd samples/openapi3/client/petstore/python-prior && make test) - (cd samples/openapi3/client/3_0_3_unit_test/python && make test) + #(cd samples/openapi3/client/3_0_3_unit_test/python && make test) else echo "Running node $NODE_INDEX to test 'samples.circleci.others' defined in pom.xml ..." diff --git a/bin/configs/python-features-dynamic-servers.yaml b/bin/configs/python-features-dynamic-servers.yaml deleted file mode 100644 index 6b154d3dd1c..00000000000 --- a/bin/configs/python-features-dynamic-servers.yaml +++ /dev/null @@ -1,6 +0,0 @@ -generatorName: python -outputDir: samples/openapi3/client/features/dynamic-servers/python/ -inputSpec: modules/openapi-generator/src/test/resources/3_0/features/dynamic-servers.yaml -templateDir: modules/openapi-generator/src/main/resources/python -additionalProperties: - packageName: dynamic_servers diff --git a/bin/configs/python.yaml b/bin/configs/python.yaml deleted file mode 100644 index 37d0948cc68..00000000000 --- a/bin/configs/python.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: python -outputDir: samples/openapi3/client/petstore/python -inputSpec: modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml -templateDir: modules/openapi-generator/src/main/resources/python -additionalProperties: - packageName: petstore_api - recursionLimit: "1234" diff --git a/bin/configs/python_3_0_3_unit_test.yaml b/bin/configs/python_3_0_3_unit_test.yaml deleted file mode 100644 index a388d873474..00000000000 --- a/bin/configs/python_3_0_3_unit_test.yaml +++ /dev/null @@ -1,6 +0,0 @@ -generatorName: python -outputDir: samples/openapi3/client/3_0_3_unit_test/python -inputSpec: modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml -templateDir: modules/openapi-generator/src/main/resources/python -additionalProperties: - packageName: unit_test_api diff --git a/docs/generators.md b/docs/generators.md index 6c1ff33144b..a2b0e2f2e18 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -52,7 +52,6 @@ The following generators are available: * [php](generators/php.md) * [php-dt (beta)](generators/php-dt.md) * [powershell (beta)](generators/powershell.md) -* [python](generators/python.md) * [python-nextgen](generators/python-nextgen.md) * [r](generators/r.md) * [ruby](generators/ruby.md) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java index 3a3d08c9fc4..2c1414d21ce 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java @@ -49,7 +49,6 @@ import org.openapitools.codegen.CodegenDiscriminator.MappedModel; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.examples.ExampleGenerator; -import org.openapitools.codegen.languages.PythonClientCodegen; import org.openapitools.codegen.languages.RustServerCodegen; import org.openapitools.codegen.meta.FeatureSet; import org.openapitools.codegen.meta.GeneratorMetadata; @@ -651,9 +650,7 @@ public class DefaultCodegen implements CodegenConfig { removeSelfReferenceImports(cm); if (!this.getLegacyDiscriminatorBehavior()) { - // skip cleaning up mapped models for python client generator - // which uses its own logic - cm.addDiscriminatorMappedModelsImports(!(this instanceof PythonClientCodegen)); + cm.addDiscriminatorMappedModelsImports(true); } } } @@ -3777,14 +3774,13 @@ public class DefaultCodegen implements CodegenConfig { Schema original = null; // check if it's allOf (only 1 sub schema) with or without default/nullable/etc set in the top level - if (ModelUtils.isAllOf(p) && p.getAllOf().size() == 1 && !(this instanceof PythonClientCodegen)) { + if (ModelUtils.isAllOf(p) && p.getAllOf().size() == 1) { if (p.getAllOf().get(0) instanceof Schema) { original = p; p = (Schema) p.getAllOf().get(0); } else { LOGGER.error("Unknown type in allOf schema. Please report the issue via openapi-generator's Github issue tracker."); } - } CodegenProperty property = CodegenModelFactory.newInstance(CodegenModelType.PROPERTY); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java index 1d6f0012a34..15cc5ab410e 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java @@ -40,7 +40,6 @@ import org.openapitools.codegen.config.GlobalSettings; import org.openapitools.codegen.api.TemplatingEngineAdapter; import org.openapitools.codegen.api.TemplateFileType; import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; -import org.openapitools.codegen.languages.PythonClientCodegen; import org.openapitools.codegen.meta.GeneratorMetadata; import org.openapitools.codegen.meta.Stability; import org.openapitools.codegen.model.ApiInfoMap; @@ -546,9 +545,8 @@ public class DefaultGenerator implements Generator { ModelMap modelTemplate = modelList.get(0); if (modelTemplate != null && modelTemplate.getModel() != null) { CodegenModel m = modelTemplate.getModel(); - if (m.isAlias && !(config instanceof PythonClientCodegen)) { + if (m.isAlias) { // alias to number, string, enum, etc, which should not be generated as model - // for PythonClientCodegen, all aliases are generated as models continue; // Don't create user-defined classes for aliases } } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java deleted file mode 100644 index d1184714668..00000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java +++ /dev/null @@ -1,2804 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.languages; - -import com.github.curiousoddman.rgxgen.RgxGen; -import com.github.curiousoddman.rgxgen.config.RgxGenOption; -import com.github.curiousoddman.rgxgen.config.RgxGenProperties; -import com.google.common.base.CaseFormat; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.PathItem; -import io.swagger.v3.oas.models.Paths; -import io.swagger.v3.oas.models.servers.Server; -import io.swagger.v3.oas.models.tags.Tag; - -import org.apache.commons.io.FileUtils; -import org.openapitools.codegen.api.TemplatePathLocator; -import org.openapitools.codegen.config.GlobalSettings; -import org.openapitools.codegen.ignore.CodegenIgnoreProcessor; -import org.openapitools.codegen.model.ModelMap; -import org.openapitools.codegen.model.ModelsMap; -import org.openapitools.codegen.model.OperationMap; -import org.openapitools.codegen.model.OperationsMap; -import org.openapitools.codegen.templating.*; -import io.swagger.v3.core.util.Json; -import io.swagger.v3.oas.models.media.*; -import io.swagger.v3.oas.models.parameters.Parameter; -import io.swagger.v3.oas.models.parameters.RequestBody; -import io.swagger.v3.oas.models.security.SecurityScheme; -import org.apache.commons.lang3.StringUtils; -import org.openapitools.codegen.*; -import org.openapitools.codegen.CodegenDiscriminator.MappedModel; -import org.openapitools.codegen.api.TemplatingEngineAdapter; -import org.openapitools.codegen.meta.GeneratorMetadata; -import org.openapitools.codegen.meta.Stability; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.openapitools.codegen.utils.ProcessUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.openapitools.codegen.api.TemplateProcessor; - -import java.io.File; -import java.io.IOException; -import java.math.BigDecimal; -import java.nio.file.Path; -import java.time.OffsetDateTime; -import java.time.ZoneOffset; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import static org.openapitools.codegen.utils.OnceLogger.once; -import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class PythonClientCodegen extends AbstractPythonCodegen { - private final Logger LOGGER = LoggerFactory.getLogger(PythonClientCodegen.class); - - public static final String PACKAGE_URL = "packageUrl"; - public static final String DEFAULT_LIBRARY = "urllib3"; - // nose is a python testing framework, we use pytest if USE_NOSE is unset - public static final String USE_NOSE = "useNose"; - public static final String RECURSION_LIMIT = "recursionLimit"; - public static final String USE_INLINE_MODEL_RESOLVER = "useInlineModelResolver"; - - protected String packageUrl; - protected String apiDocPath = "docs/apis/tags/"; - protected String modelDocPath = "docs/models/"; - protected boolean useNose = false; - protected boolean useInlineModelResolver = false; - - protected Map regexModifiers; - - private String testFolder; - - // A cache to efficiently lookup a Schema instance based on the return value of `toModelName()`. - private Map modelNameToSchemaCache; - private DateTimeFormatter iso8601Date = DateTimeFormatter.ISO_DATE; - private DateTimeFormatter iso8601DateTime = DateTimeFormatter.ISO_DATE_TIME; - - private String templateExtension; - protected CodegenIgnoreProcessor ignoreProcessor; - protected TemplateProcessor templateProcessor = null; - - // for apis.tags imports - private Map tagModuleNameToApiClassname = new LinkedHashMap<>(); - // for apis.tags enum tag definition - private Map enumToTag = new LinkedHashMap<>(); - // for apis.tags tag api definition - private Map tagEnumToApiClassname = new LinkedHashMap<>(); - - private boolean nonCompliantUseDiscrIfCompositionFails = false; - - public PythonClientCodegen() { - super(); - loadDeepObjectIntoItems = false; - importBaseType = false; - addSchemaImportsFromV3SpecLocations = true; - sortModelPropertiesByRequiredFlag = Boolean.TRUE; - sortParamsByRequiredFlag = Boolean.TRUE; - addSuffixToDuplicateOperationNicknames = false; - - modifyFeatureSet(features -> features - .includeSchemaSupportFeatures( - SchemaSupportFeature.Simple, - SchemaSupportFeature.Composite, - SchemaSupportFeature.Polymorphism, - SchemaSupportFeature.Union, - SchemaSupportFeature.allOf, - SchemaSupportFeature.anyOf, - SchemaSupportFeature.oneOf, - SchemaSupportFeature.not - ) - .includeDocumentationFeatures(DocumentationFeature.Readme) - .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.Custom)) - .securityFeatures(EnumSet.of( - SecurityFeature.BasicAuth, - SecurityFeature.BearerToken, - SecurityFeature.ApiKey, - SecurityFeature.OAuth2_Implicit - )) - .includeDataTypeFeatures( - DataTypeFeature.Null, - DataTypeFeature.AnyType, - DataTypeFeature.Uuid - ) - .includeGlobalFeatures( - GlobalFeature.ParameterizedServer, - GlobalFeature.ParameterStyling - ) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects - ) - .excludeSchemaSupportFeatures( - ) - .excludeParameterFeatures( - ParameterFeature.Cookie - ) - ); - - // clear import mapping (from default generator) as python does not use it - // at the moment - importMapping.clear(); - - modelPackage = "model"; - apiPackage = "apis"; - outputFolder = "generated-code" + File.separatorChar + "python"; - - embeddedTemplateDir = templateDir = "python"; - - testFolder = "test"; - - // default HIDE_GENERATION_TIMESTAMP to true - hideGenerationTimestamp = Boolean.TRUE; - - // from https://docs.python.org/3/reference/lexical_analysis.html#keywords - setReservedWordsLowerCase( - Arrays.asList( - // local variable name used in API methods (endpoints) - "all_params", "resource_path", "path_params", "query_params", - "header_params", "form_params", "local_var_files", "body_params", "auth_settings", - // @property - "property", - // python reserved words - "and", "del", "from", "not", "while", "as", "elif", "global", "or", "with", - "assert", "else", "if", "pass", "yield", "break", "except", "import", - "print", "class", "exec", "in", "raise", "continue", "finally", "is", - "return", "def", "for", "lambda", "try", "self", "nonlocal", "None", "True", - "False", "async", "await", - // types - "float", "int", "str", "bool", "none_type", "dict", "frozendict", "list", "tuple", "file_type")); - - regexModifiers = new HashMap(); - regexModifiers.put('i', "IGNORECASE"); - regexModifiers.put('l', "LOCALE"); - regexModifiers.put('m', "MULTILINE"); - regexModifiers.put('s', "DOTALL"); - regexModifiers.put('u', "UNICODE"); - regexModifiers.put('x', "VERBOSE"); - - cliOptions.clear(); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "python package name (convention: snake_case).") - .defaultValue("openapi_client")); - cliOptions.add(new CliOption(CodegenConstants.PROJECT_NAME, "python project name in setup.py (e.g. petstore-api).")); - cliOptions.add(new CliOption(CodegenConstants.PACKAGE_VERSION, "python package version.") - .defaultValue("1.0.0")); - cliOptions.add(new CliOption(PACKAGE_URL, "python package URL.")); - // this generator does not use SORT_PARAMS_BY_REQUIRED_FLAG - // this generator uses the following order for endpoint parameters and model properties - // required params - // optional params which are set to unset as their default for method signatures only - // optional params as **kwargs - cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC) - .defaultValue(Boolean.TRUE.toString())); - cliOptions.add(new CliOption(CodegenConstants.SOURCECODEONLY_GENERATION, CodegenConstants.SOURCECODEONLY_GENERATION_DESC) - .defaultValue(Boolean.FALSE.toString())); - cliOptions.add(CliOption.newBoolean(USE_NOSE, "use the nose test framework"). - defaultValue(Boolean.FALSE.toString())); - cliOptions.add(new CliOption(RECURSION_LIMIT, "Set the recursion limit. If not set, use the system default value.")); - cliOptions.add(CliOption.newBoolean(USE_INLINE_MODEL_RESOLVER, "use the inline model resolver, if true inline complex models will be extracted into components and $refs to them will be used"). - defaultValue(Boolean.FALSE.toString())); - CliOption nonCompliantUseDiscrIfCompositionFails = CliOption.newBoolean(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS_DESC); - Map nonCompliantUseDiscrIfCompositionFailsOpts = new HashMap<>(); - nonCompliantUseDiscrIfCompositionFailsOpts.put("true", "If composition fails and a discriminator exists, the composition errors will be ignored and validation will be attempted with the discriminator"); - nonCompliantUseDiscrIfCompositionFailsOpts.put("false", "Composition validation must succeed. Discriminator validation must succeed."); - nonCompliantUseDiscrIfCompositionFails.setEnum(nonCompliantUseDiscrIfCompositionFailsOpts); - - cliOptions.add(nonCompliantUseDiscrIfCompositionFails); - - supportedLibraries.put("urllib3", "urllib3-based client"); - CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use: urllib3"); - libraryOption.setDefault(DEFAULT_LIBRARY); - cliOptions.add(libraryOption); - setLibrary(DEFAULT_LIBRARY); - - // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. - // In principle, this should be enabled by default for all code generators. However due to limitations - // in other code generators, support needs to be enabled on a case-by-case basis. - supportsAdditionalPropertiesWithComposedSchema = true; - - // When the 'additionalProperties' keyword is not present in a OAS schema, allow - // undeclared properties. This is compliant with the JSON schema specification. - this.setDisallowAdditionalPropertiesIfNotPresent(false); - GlobalSettings.setProperty("x-disallow-additional-properties-if-not-present", "false"); - - // this may set datatype right for additional properties - instantiationTypes.put("map", "dict"); - - languageSpecificPrimitives.add("file_type"); - languageSpecificPrimitives.add("none_type"); - typeMapping.put("decimal", "str"); - - generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata) - .stability(Stability.STABLE) - .build(); - } - - @Override - public void processOpts() { - this.setLegacyDiscriminatorBehavior(false); - - super.processOpts(); - - TemplatingEngineAdapter te = getTemplatingEngine(); - if (te instanceof HandlebarsEngineAdapter) { - HandlebarsEngineAdapter hea = (HandlebarsEngineAdapter) te; - hea.infiniteLoops(true); - hea.setPrettyPrint(true); - } else { - throw new RuntimeException("Only the HandlebarsEngineAdapter is supported for this generator"); - } - - TemplatePathLocator commonTemplateLocator = new CommonTemplateContentLocator(); - TemplatePathLocator generatorTemplateLocator = new GeneratorTemplateContentLocator(this); - TemplateManagerOptions templateManagerOptions = new TemplateManagerOptions(this.isEnableMinimalUpdate(),this.isSkipOverwrite()); - templateProcessor = new TemplateManager( - templateManagerOptions, - te, - new TemplatePathLocator[]{generatorTemplateLocator, commonTemplateLocator} - ); - templateExtension = te.getIdentifier(); - - String ignoreFileLocation = this.getIgnoreFilePathOverride(); - if (ignoreFileLocation != null) { - final File ignoreFile = new File(ignoreFileLocation); - if (ignoreFile.exists() && ignoreFile.canRead()) { - this.ignoreProcessor = new CodegenIgnoreProcessor(ignoreFile); - } else { - LOGGER.warn("Ignore file specified at {} is not valid. This will fall back to an existing ignore file if present in the output directory.", ignoreFileLocation); - } - } - - if (this.ignoreProcessor == null) { - this.ignoreProcessor = new CodegenIgnoreProcessor(this.getOutputDir()); - } - - modelTemplateFiles.put("model." + templateExtension, ".py"); - /* - This stub file exists to allow pycharm to read and use typing.overload decorators for it to see that - dict_instance["someProp"] is of type SomeClass.properties.someProp - See https://youtrack.jetbrains.com/issue/PY-42137/PyCharm-type-hinting-doesnt-work-well-with-overload-decorator - */ - modelTemplateFiles.put("model_stub." + templateExtension, ".pyi"); - apiTemplateFiles.put("api." + templateExtension, ".py"); - modelTestTemplateFiles.put("model_test." + templateExtension, ".py"); - modelDocTemplateFiles.put("model_doc." + templateExtension, ".md"); - apiDocTemplateFiles.put("api_doc." + templateExtension, ".md"); - - if (StringUtils.isEmpty(System.getenv("PYTHON_POST_PROCESS_FILE"))) { - LOGGER.info("Environment variable PYTHON_POST_PROCESS_FILE not defined so the Python code may not be properly formatted. To define it, try 'export PYTHON_POST_PROCESS_FILE=\"/usr/local/bin/yapf -i\"' (Linux/Mac)"); - LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI)."); - } - - Boolean excludeTests = false; - - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_NAME)) { - setPackageName((String) additionalProperties.get(CodegenConstants.PACKAGE_NAME)); - } - - if (additionalProperties.containsKey(CodegenConstants.PROJECT_NAME)) { - setProjectName((String) additionalProperties.get(CodegenConstants.PROJECT_NAME)); - } else { - // default: set project based on package name - // e.g. petstore_api (package name) => petstore-api (project name) - setProjectName(packageName.replaceAll("_", "-")); - } - - if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) { - setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION)); - } - - additionalProperties.put(CodegenConstants.PROJECT_NAME, projectName); - additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName); - additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion); - - if (additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) { - excludeTests = Boolean.valueOf(additionalProperties.get(CodegenConstants.EXCLUDE_TESTS).toString()); - } - - Boolean generateSourceCodeOnly = false; - if (additionalProperties.containsKey(CodegenConstants.SOURCECODEONLY_GENERATION)) { - generateSourceCodeOnly = Boolean.valueOf(additionalProperties.get(CodegenConstants.SOURCECODEONLY_GENERATION).toString()); - } - - if (generateSourceCodeOnly) { - // tests in test - testFolder = packagePath() + File.separatorChar + testFolder; - // api docs in /docs/apis/tags/ - apiDocPath = packagePath() + File.separatorChar + apiDocPath; - // model docs in /docs/models/ - modelDocPath = packagePath() + File.separatorChar + modelDocPath; - } - // make api and model doc path available in templates - additionalProperties.put("apiDocPath", apiDocPath); - additionalProperties.put("modelDocPath", modelDocPath); - - if (additionalProperties.containsKey(PACKAGE_URL)) { - setPackageUrl((String) additionalProperties.get(PACKAGE_URL)); - } - - if (additionalProperties.containsKey(USE_NOSE)) { - setUseNose((String) additionalProperties.get(USE_NOSE)); - } - - if (additionalProperties.containsKey(USE_INLINE_MODEL_RESOLVER)) { - setUseInlineModelResolver((String) additionalProperties.get(USE_INLINE_MODEL_RESOLVER)); - } - - // check to see if setRecursionLimit is set and whether it's an integer - if (additionalProperties.containsKey(RECURSION_LIMIT)) { - try { - Integer.parseInt((String) additionalProperties.get(RECURSION_LIMIT)); - } catch (NumberFormatException | NullPointerException e) { - throw new IllegalArgumentException("recursionLimit must be an integer, e.g. 2000."); - } - } - - if (additionalProperties.containsKey(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS)) { - nonCompliantUseDiscrIfCompositionFails = Boolean.parseBoolean( - additionalProperties.get(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS).toString() - ); - } - - String readmePath = "README.md"; - String readmeTemplate = "README." + templateExtension; - if (generateSourceCodeOnly) { - readmePath = packagePath() + "_" + readmePath; - readmeTemplate = "README_onlypackage." + templateExtension; - } - supportingFiles.add(new SupportingFile(readmeTemplate, "", readmePath)); - - if (!generateSourceCodeOnly) { - supportingFiles.add(new SupportingFile("tox." + templateExtension, "", "tox.ini")); - supportingFiles.add(new SupportingFile("test-requirements." + templateExtension, "", "test-requirements.txt")); - supportingFiles.add(new SupportingFile("requirements." + templateExtension, "", "requirements.txt")); - supportingFiles.add(new SupportingFile("setup_cfg." + templateExtension, "", "setup.cfg")); - - supportingFiles.add(new SupportingFile("git_push.sh." + templateExtension, "", "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore." + templateExtension, "", ".gitignore")); - supportingFiles.add(new SupportingFile("travis." + templateExtension, "", ".travis.yml")); - supportingFiles.add(new SupportingFile("gitlab-ci." + templateExtension, "", ".gitlab-ci.yml")); - supportingFiles.add(new SupportingFile("setup." + templateExtension, "", "setup.py")); - } - supportingFiles.add(new SupportingFile("configuration." + templateExtension, packagePath(), "configuration.py")); - supportingFiles.add(new SupportingFile("__init__package." + templateExtension, packagePath(), "__init__.py")); - - // If the package name consists of dots(openapi.client), then we need to create the directory structure like openapi/client with __init__ files. - String[] packageNameSplits = packageName.split("\\."); - String currentPackagePath = ""; - for (int i = 0; i < packageNameSplits.length - 1; i++) { - if (i > 0) { - currentPackagePath = currentPackagePath + File.separatorChar; - } - currentPackagePath = currentPackagePath + packageNameSplits[i]; - supportingFiles.add(new SupportingFile("__init__." + templateExtension, currentPackagePath, "__init__.py")); - } - - supportingFiles.add(new SupportingFile("exceptions." + templateExtension, packagePath(), "exceptions.py")); - - if (Boolean.FALSE.equals(excludeTests)) { - supportingFiles.add(new SupportingFile("__init__." + templateExtension, testFolder, "__init__.py")); - supportingFiles.add(new SupportingFile("__init__." + templateExtension, testFolder + File.separator + "test_models", "__init__.py")); - } - - supportingFiles.add(new SupportingFile("api_client." + templateExtension, packagePath(), "api_client.py")); - - if ("asyncio".equals(getLibrary())) { - supportingFiles.add(new SupportingFile("asyncio/rest." + templateExtension, packagePath(), "rest.py")); - additionalProperties.put("asyncio", "true"); - } else if ("tornado".equals(getLibrary())) { - supportingFiles.add(new SupportingFile("tornado/rest." + templateExtension, packagePath(), "rest.py")); - additionalProperties.put("tornado", "true"); - } else { - supportingFiles.add(new SupportingFile("rest." + templateExtension, packagePath(), "rest.py")); - } - - supportingFiles.add(new SupportingFile("schemas." + templateExtension, packagePath(), "schemas.py")); - - // add the models and apis folders - supportingFiles.add(new SupportingFile("__init__models." + templateExtension, packagePath() + File.separatorChar + "models", "__init__.py")); - supportingFiles.add(new SupportingFile("__init__model." + templateExtension, packagePath() + File.separatorChar + modelPackage, "__init__.py")); - supportingFiles.add(new SupportingFile("__init__apis." + templateExtension, packagePath() + File.separatorChar + apiPackage, "__init__.py")); - // Generate the 'signing.py' module, but only if the 'HTTP signature' security scheme is specified in the OAS. - Map securitySchemeMap = openAPI != null ? - (openAPI.getComponents() != null ? openAPI.getComponents().getSecuritySchemes() : null) : null; - List authMethods = fromSecurity(securitySchemeMap); - if (ProcessUtils.hasHttpSignatureMethods(authMethods)) { - supportingFiles.add(new SupportingFile("signing." + templateExtension, packagePath(), "signing.py")); - } - - // default this to true so the python ModelSimple models will be generated - ModelUtils.setGenerateAliasAsModel(true); - LOGGER.info(CodegenConstants.GENERATE_ALIAS_AS_MODEL + " is hard coded to true in this generator. Alias models will only be generated if they contain validations or enums"); - - // check library option to ensure only urllib3 is supported - if (!DEFAULT_LIBRARY.equals(getLibrary())) { - throw new RuntimeException("Only the `urllib3` library is supported in the refactored `python` client generator at the moment. Please fall back to `python-legacy` client generator for the time being. We welcome contributions to add back `asyncio`, `tornado` support to the `python` client generator."); - } - } - - public String packageFilename(List pathSegments) { - String prefix = outputFolder + File.separatorChar + packagePath() + File.separatorChar; - String suffix = pathSegments.stream().collect(Collectors.joining(File.separator)); - return prefix + suffix; - } - - public String filenameFromRoot(List pathSegments) { - String prefix = outputFolder + File.separatorChar; - String suffix = pathSegments.stream().collect(Collectors.joining(File.separator)); - return prefix + suffix; - } - - protected File processTemplateToFile(Map templateData, String templateName, String outputFilename, boolean shouldGenerate, String skippedByOption) throws IOException { - String adjustedOutputFilename = outputFilename.replaceAll("//", "/").replace('/', File.separatorChar); - File target = new File(adjustedOutputFilename); - if (ignoreProcessor.allowsFile(target)) { - if (shouldGenerate) { - Path outDir = java.nio.file.Paths.get(this.getOutputDir()).toAbsolutePath(); - Path absoluteTarget = target.toPath().toAbsolutePath(); - if (!absoluteTarget.startsWith(outDir)) { - throw new RuntimeException(String.format(Locale.ROOT, "Target files must be generated within the output directory; absoluteTarget=%s outDir=%s", absoluteTarget, outDir)); - } - return this.templateProcessor.write(templateData,templateName, target); - } else { - this.templateProcessor.skip(target.toPath(), String.format(Locale.ROOT, "Skipped by %s options supplied by user.", skippedByOption)); - return null; - } - } else { - this.templateProcessor.ignore(target.toPath(), "Ignored by rule in ignore file."); - return null; - } - } - - @Override - public String apiFilename(String templateName, String tag) { - String suffix = apiTemplateFiles().get(templateName); - return apiFileFolder() + File.separator + toApiFilename(tag) + suffix; - } - - private void generateFiles(List> processTemplateToFileInfos, boolean shouldGenerate, String skippedByOption) { - for (List processTemplateToFileInfo: processTemplateToFileInfos) { - Map templateData = (Map) processTemplateToFileInfo.get(0); - String templateName = (String) processTemplateToFileInfo.get(1); - String outputFilename = (String) processTemplateToFileInfo.get(2); - try { - processTemplateToFile(templateData, templateName, outputFilename, shouldGenerate, skippedByOption); - } catch (IOException e) { - LOGGER.error("Error when writing template file {}", e.toString()); - } - } - } - - @Override - public String toApiName(String name) { - if (name.length() == 0) { - return "DefaultApi"; - } - return toModelName(name) + apiNameSuffix; - } - - /* - I made this method because endpoint parameters not contain a lot of needed metadata - It is very verbose to write all of this info into the api template - This ingests all operations under a tag in the objs input and writes out one file for each endpoint - */ - protected void generateEndpoints(OperationsMap objs) { - if (!(Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS)) { - return; - } - Paths paths = openAPI.getPaths(); - if (paths == null) { - return; - } - List> pathsFiles = new ArrayList<>(); - List> apisFiles = new ArrayList<>(); - List> testFiles = new ArrayList<>(); - String outputFilename; - - // endpoint tags may not exist in the root of the spec file - // this is allowed per openapi - // because spec tags may be empty ro incomplete, tags are also accumulated from endpoints - List tags = openAPI.getTags(); - if (tags != null) { - for (Tag tag: tags) { - String tagName = tag.getName(); - String tagModuleName = toApiFilename(tagName); - String apiClassname = toApiName(tagName); - tagModuleNameToApiClassname.put(tagModuleName, apiClassname); - String tagEnum = toEnumVarName(tagName, "str"); - enumToTag.put(tagEnum, tagName); - tagEnumToApiClassname.put(tagEnum, apiClassname); - } - } - - OperationMap operations = objs.getOperations(); - List codegenOperations = operations.getOperation(); - HashMap pathModuleToPath = new HashMap<>(); - // paths.some_path.post.py (single endpoint definition) - for (CodegenOperation co: codegenOperations) { - if (co.tags != null) { - for (Tag tag: co.tags) { - String tagName = tag.getName(); - String tagModuleName = toApiFilename(tagName); - String apiClassname = toApiName(tagName); - tagModuleNameToApiClassname.put(tagModuleName, apiClassname); - String tagEnum = toEnumVarName(tagName, "str"); - enumToTag.put(tagEnum, tagName); - tagEnumToApiClassname.put(tagEnum, apiClassname); - } - } - String path = co.path; - String pathModuleName = co.nickname; - if (!pathModuleToPath.containsKey(pathModuleName)) { - pathModuleToPath.put(pathModuleName, path); - } - Map endpointMap = new HashMap<>(); - endpointMap.put("operation", co); - endpointMap.put("imports", co.imports); - endpointMap.put("packageName", packageName); - outputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod + ".py")); - pathsFiles.add(Arrays.asList(endpointMap, "endpoint.handlebars", outputFilename)); - /* - This stub file exists to allow pycharm to read and use typing.overload decorators for it to see that - dict_instance["someProp"] is of type SomeClass.properties.someProp - See https://youtrack.jetbrains.com/issue/PY-42137/PyCharm-type-hinting-doesnt-work-well-with-overload-decorator - */ - String stubOutputFilename = packageFilename(Arrays.asList("paths", pathModuleName, co.httpMethod + ".pyi")); - pathsFiles.add(Arrays.asList(endpointMap, "endpoint_stub.handlebars", stubOutputFilename)); - - Map endpointTestMap = new HashMap<>(); - endpointTestMap.put("operation", co); - endpointTestMap.put("packageName", packageName); - outputFilename = filenameFromRoot(Arrays.asList("test", "test_paths", "test_" + pathModuleName, "test_" + co.httpMethod + ".py")); - testFiles.add(Arrays.asList(endpointTestMap, "api_test.handlebars", outputFilename)); - outputFilename = filenameFromRoot(Arrays.asList("test", "test_paths", "test_" + pathModuleName, "__init__.py")); - testFiles.add(Arrays.asList(new HashMap<>(), "__init__.handlebars", outputFilename)); - } - outputFilename = filenameFromRoot(Arrays.asList("test", "test_paths", "__init__.py")); - testFiles.add(Arrays.asList(new HashMap<>(), "__init__test_paths.handlebars", outputFilename)); - - Map pathValToVar = new LinkedHashMap<>(); - Map pathModuleToApiClassname = new LinkedHashMap<>(); - Map pathEnumToApiClassname = new LinkedHashMap<>(); - for (Map.Entry pathsEntry : paths.entrySet()) { - String path = pathsEntry.getKey(); - String pathEnumVar = toEnumVarName(path, "str"); - pathValToVar.put(path, pathEnumVar); - String apiClassName = toModelName(path); - pathEnumToApiClassname.put(pathEnumVar, apiClassName); - pathModuleToApiClassname.put(toVarName(path), apiClassName); - } - // Note: __init__apis.handlebars is generated as a supporting file - // apis.tag_to_api.py - Map tagToApiMap = new HashMap<>(); - tagToApiMap.put("packageName", packageName); - tagToApiMap.put("apiClassname", "Api"); - tagToApiMap.put("tagModuleNameToApiClassname", tagModuleNameToApiClassname); - tagToApiMap.put("tagEnumToApiClassname", tagEnumToApiClassname); - outputFilename = packageFilename(Arrays.asList("apis", "tag_to_api.py")); - apisFiles.add(Arrays.asList(tagToApiMap, "apis_tag_to_api.handlebars", outputFilename)); - // apis.path_to_api.py - Map allByPathsFileMap = new HashMap<>(); - allByPathsFileMap.put("packageName", packageName); - allByPathsFileMap.put("apiClassname", "Api"); - allByPathsFileMap.put("pathModuleToApiClassname", pathModuleToApiClassname); - allByPathsFileMap.put("pathEnumToApiClassname", pathEnumToApiClassname); - outputFilename = packageFilename(Arrays.asList("apis", "path_to_api.py")); - apisFiles.add(Arrays.asList(allByPathsFileMap, "apis_path_to_api.handlebars", outputFilename)); - // apis.paths.__init__.py - Map initApiTagsMap = new HashMap<>(); - initApiTagsMap.put("packageName", packageName); - initApiTagsMap.put("enumToTag", enumToTag); - outputFilename = packageFilename(Arrays.asList("apis", "tags", "__init__.py")); - apisFiles.add(Arrays.asList(initApiTagsMap, "__init__apis_tags.handlebars", outputFilename)); - - // paths.__init__.py (contains path str enum) - Map initOperationMap = new HashMap<>(); - initOperationMap.put("packageName", packageName); - initOperationMap.put("apiClassname", "Api"); - initOperationMap.put("pathValToVar", pathValToVar); - outputFilename = packageFilename(Arrays.asList("paths", "__init__.py")); - pathsFiles.add(Arrays.asList(initOperationMap, "__init__paths_enum.handlebars", outputFilename)); - // apis.paths.__init__.py - outputFilename = packageFilename(Arrays.asList("apis", "paths", "__init__.py")); - apisFiles.add(Arrays.asList(initOperationMap, "__init__paths.handlebars", outputFilename)); - // paths.some_path.__init__.py - // apis.paths.some_path.py - for (Map.Entry entry: pathModuleToPath.entrySet()) { - String pathModule = entry.getKey(); - String path = entry.getValue(); - String pathVar = pathValToVar.get(path); - Map pathApiMap = new HashMap<>(); - pathApiMap.put("packageName", packageName); - pathApiMap.put("pathModule", pathModule); - pathApiMap.put("apiClassName", "Api"); - pathApiMap.put("pathVar", pathVar); - outputFilename = packageFilename(Arrays.asList("paths", pathModule, "__init__.py")); - pathsFiles.add(Arrays.asList(pathApiMap, "__init__paths_x.handlebars", outputFilename)); - - PathItem pi = openAPI.getPaths().get(path); - String apiClassName = pathEnumToApiClassname.get(pathVar); - Map operationMap = new HashMap<>(); - operationMap.put("packageName", packageName); - operationMap.put("pathModule", pathModule); - operationMap.put("apiClassName", apiClassName); - operationMap.put("pathItem", pi); - outputFilename = packageFilename(Arrays.asList("apis", "paths", pathModule + ".py")); - apisFiles.add(Arrays.asList(operationMap, "apis_path_module.handlebars", outputFilename)); - } - boolean shouldGenerateApis = (boolean) additionalProperties().get(CodegenConstants.GENERATE_APIS); - boolean shouldGenerateApiTests = (boolean) additionalProperties().get(CodegenConstants.GENERATE_API_TESTS); - generateFiles(pathsFiles, shouldGenerateApis, CodegenConstants.APIS); - generateFiles(apisFiles, shouldGenerateApis, CodegenConstants.APIS); - generateFiles(testFiles, shouldGenerateApiTests, CodegenConstants.API_TESTS); - } - - /* - We have a custom version of this method so for composed schemas and object schemas we add properties only if they - are defined in that schema (x.properties). We do this because validation should be done independently in each schema - If properties are hosted into composed schemas, they can collide or incorrectly list themself as required when - they are not. - */ - @Override - protected void addVarsRequiredVarsAdditionalProps(Schema schema, IJsonSchemaValidationProperties property){ - setAddProps(schema, property); - if (ModelUtils.isAnyType(schema) && supportsAdditionalPropertiesWithComposedSchema) { - // if anyType schema has properties then add them - if (schema.getProperties() != null && !schema.getProperties().isEmpty()) { - if (schema instanceof ComposedSchema) { - ComposedSchema cs = (ComposedSchema) schema; - if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { - LOGGER.warn("'oneOf' is intended to include only the additional optional OAS extension discriminator object. " + - "For more details, see https://json-schema.org/draft/2019-09/json-schema-core.html#rfc.section.9.2.1.3 and the OAS section on 'Composition and Inheritance'."); - } - } - HashSet requiredVars = new HashSet<>(); - if (schema.getRequired() != null) { - requiredVars.addAll(schema.getRequired()); - } - addVars(property, property.getVars(), schema.getProperties(), requiredVars); - } - addRequiredVarsMap(schema, property); - return; - } else if (ModelUtils.isTypeObjectSchema(schema)) { - HashSet requiredVars = new HashSet<>(); - if (schema.getRequired() != null) { - requiredVars.addAll(schema.getRequired()); - property.setHasRequired(true); - } - addVars(property, property.getVars(), schema.getProperties(), requiredVars); - if (property.getVars() != null && !property.getVars().isEmpty()) { - property.setHasVars(true); - } - } - addRequiredVarsMap(schema, property); - return; - } - - /** - * Configures a friendly name for the generator. This will be used by the - * generator to select the library with the -g flag. - * - * @return the friendly name for the generator - */ - @Override - public String getName() { - return "python"; - } - - @Override - public String getHelp() { - String newLine = System.getProperty("line.separator"); - return String.join("
", - "Generates a Python client library", - "", - "Features in this generator:", - "- type hints on endpoints and model creation", - "- model parameter names use the spec defined keys and cases", - "- robust composition (oneOf/anyOf/allOf/not) where payload data is stored in one instance only", - "- endpoint parameter names use the spec defined keys and cases", - "- inline schemas are supported at any location including composition", - "- multiple content types supported in request body and response bodies", - "- run time type checking", - "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema", - "- Sending/receiving uuids as strings supported with type:string format: uuid -> UUIDSchema", - "- quicker load time for python modules (a single endpoint can be imported and used without loading others)", - "- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed", - "- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)", - "- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor", - " - Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int"); - } - - @Override - public Schema unaliasSchema(Schema schema) { - Map allSchemas = ModelUtils.getSchemas(openAPI); - if (allSchemas == null || allSchemas.isEmpty()) { - // skip the warning as the spec can have no model defined - //LOGGER.warn("allSchemas cannot be null/empty in unaliasSchema. Returned 'schema'"); - return schema; - } - - if (schema != null && StringUtils.isNotEmpty(schema.get$ref())) { - String simpleRef = ModelUtils.getSimpleRef(schema.get$ref()); - if (schemaMapping.containsKey(simpleRef)) { - LOGGER.debug("Schema unaliasing of {} omitted because aliased class is to be mapped to {}", simpleRef, schemaMapping.get(simpleRef)); - return schema; - } - Schema ref = allSchemas.get(simpleRef); - if (ref == null) { - once(LOGGER).warn("{} is not defined", schema.get$ref()); - return schema; - } else if (ref.getEnum() != null && !ref.getEnum().isEmpty()) { - // top-level enum class - return schema; - } else if (ModelUtils.isArraySchema(ref)) { - if (ModelUtils.isGenerateAliasAsModel(ref)) { - return schema; // generate a model extending array - } else { - return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); - } - } else if (ModelUtils.isComposedSchema(ref)) { - return schema; - } else if (ModelUtils.isMapSchema(ref)) { - if (ref.getProperties() != null && !ref.getProperties().isEmpty()) // has at least one property - return schema; // treat it as model - else { - if (ModelUtils.isGenerateAliasAsModel(ref)) { - return schema; // generate a model extending map - } else { - // treat it as a typical map - return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); - } - } - } else if (ModelUtils.isObjectSchema(ref)) { // model - if (ref.getProperties() != null && !ref.getProperties().isEmpty()) { // has at least one property - return schema; - } else { - // free form object (type: object) - if (ModelUtils.hasValidation(ref)) { - return schema; - } else if (getAllOfDescendants(simpleRef, openAPI).size() > 0) { - return schema; - } - return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); - } - } else if (ModelUtils.hasValidation(ref)) { - // non object non array non map schemas that have validations - // are returned so we can generate those schemas as models - // we do this to: - // - preserve the validations in that model class in python - // - use those validations when we use this schema in composed oneOf schemas - return schema; - } else if (Boolean.TRUE.equals(ref.getNullable()) && ref.getEnum() == null) { - // non enum primitive with nullable True - // we make these models so instances of this will be subclasses of this model - return schema; - } else { - return unaliasSchema(allSchemas.get(ModelUtils.getSimpleRef(schema.get$ref()))); - } - } - return schema; - } - - public String pythonDate(Object dateValue) { - String strValue = null; - if (dateValue instanceof OffsetDateTime) { - OffsetDateTime date = null; - try { - date = (OffsetDateTime) dateValue; - } catch (ClassCastException e) { - LOGGER.warn("Invalid `date` format for value {}", dateValue.toString()); - date = ((Date) dateValue).toInstant().atOffset(ZoneOffset.UTC); - } - strValue = date.format(iso8601Date); - } else { - strValue = dateValue.toString(); - } - return strValue; - } - - public String pythonDateTime(Object dateTimeValue) { - String strValue = null; - if (dateTimeValue instanceof OffsetDateTime) { - OffsetDateTime dateTime = null; - try { - dateTime = (OffsetDateTime) dateTimeValue; - } catch (ClassCastException e) { - LOGGER.warn("Invalid `date-time` format for value {}", dateTimeValue.toString()); - dateTime = ((Date) dateTimeValue).toInstant().atOffset(ZoneOffset.UTC); - } - strValue = dateTime.format(iso8601DateTime); - } else { - strValue = dateTimeValue.toString(); - } - return strValue; - } - - /** - * Return the default value of the property - * - * @param p OpenAPI property object - * @return string presentation of the default value of the property - */ - @Override - public String toDefaultValue(Schema p) { - Object defaultObject = null; - if (p.getDefault() != null) { - defaultObject = p.getDefault(); - } - - if (defaultObject == null) { - return null; - } - - String defaultValue = defaultObject.toString(); - if (ModelUtils.isDateSchema(p)) { - defaultValue = pythonDate(defaultObject); - } else if (ModelUtils.isDateTimeSchema(p)) { - defaultValue = pythonDateTime(defaultObject); - } else if (ModelUtils.isStringSchema(p) && !ModelUtils.isByteArraySchema(p) && !ModelUtils.isBinarySchema(p) && !ModelUtils.isFileSchema(p) && !ModelUtils.isUUIDSchema(p) && !ModelUtils.isEmailSchema(p)) { - defaultValue = ensureQuotes(defaultValue); - } else if (ModelUtils.isBooleanSchema(p)) { - if (Boolean.valueOf(defaultValue) == false) { - defaultValue = "False"; - } else { - defaultValue = "True"; - } - } - return defaultValue; - } - - @Override - public String toModelImport(String name) { - // name looks like Cat - return "from " + packageName + "." + modelPackage() + "." + toModelFilename(name) + " import " + toModelName(name); - } - - @Override - @SuppressWarnings("static-method") - public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List allModels) { - // fix the imports that each model has, add the module reference to the model - // loops through imports and converts them all - // from 'Pet' to 'from petstore_api.model.pet import Pet' - - OperationMap val = objs.getOperations(); - List operations = val.getOperation(); - for (CodegenOperation operation : operations) { - if (operation.imports.size() == 0) { - continue; - } - String[] modelNames = operation.imports.toArray(new String[0]); - operation.imports.clear(); - for (String modelName : modelNames) { - operation.imports.add(toModelImport(modelName)); - } - } - generateEndpoints(objs); - return objs; - } - - /*** - * Override with special post-processing for all models. - * we have a custom version of this method to: - * - remove any primitive models that do not contain validations - * these models are unaliased as inline definitions wherever the spec has them as refs - * this means that the generated client does not use these models - * because they are not used we do not write them - * - fix the model imports, go from model name to the full import string with toModelImport + globalImportFixer - * Also cleans the test folder if test cases exist and the testFolder is set because the tests are autogenerated - * - * @param objs a map going from the model name to a object holding the model info - * @return the updated objs - */ - @Override - public Map postProcessAllModels(Map objs) { - super.postProcessAllModels(objs); - - boolean anyModelContainsTestCases = false; - Map allDefinitions = ModelUtils.getSchemas(this.openAPI); - for (String schemaName : allDefinitions.keySet()) { - String modelName = toModelName(schemaName); - ModelsMap objModel = objs.get(modelName); - if (objModel == null) { - // to avoid form parameter's models that are not generated (skipFormModel=true) - continue; - } - for (ModelMap model : objModel.getModels()) { - CodegenModel cm = model.getModel(); - if (cm.testCases != null && !cm.testCases.isEmpty()) { - anyModelContainsTestCases = true; - } - String[] importModelNames = cm.imports.toArray(new String[0]); - cm.imports.clear(); - for (String importModelName : importModelNames) { - cm.imports.add(toModelImport(importModelName)); - } - } - } - boolean testFolderSet = testFolder != null; - if (testFolderSet && anyModelContainsTestCases) { - // delete the test folder because tests there will be autogenerated - String testPath = outputFolder + File.separatorChar + testFolder; - File testDirectory = new File(testPath); - try { - FileUtils.cleanDirectory(testDirectory); - } catch (IOException e) { - LOGGER.info("Unable to delete the test folder because of exception=" + e.toString()); - } - - } - - return objs; - } - - public CodegenParameter fromParameter(Parameter parameter, Set imports) { - CodegenParameter cp = super.fromParameter(parameter, imports); - if (parameter.getStyle() != null) { - switch(parameter.getStyle()) { - case MATRIX: - cp.style = "MATRIX"; - break; - case LABEL: - cp.style = "LABEL"; - break; - case FORM: - cp.style = "FORM"; - break; - case SIMPLE: - cp.style = "SIMPLE"; - break; - case SPACEDELIMITED: - cp.style = "SPACE_DELIMITED"; - break; - case PIPEDELIMITED: - cp.style = "PIPE_DELIMITED"; - break; - case DEEPOBJECT: - cp.style = "DEEP_OBJECT"; - break; - } - } - // clone this so we can change some properties on it - CodegenProperty schemaProp = cp.getSchema(); - // parameters may have valid python names like some_val or invalid ones like Content-Type - // we always set nameInSnakeCase to null so special handling will not be done for these names - // invalid python names will be handled in python by using a TypedDict which will allow us to have a type hint - // for keys that cannot be variable names to the schema baseName - if (schemaProp != null) { - schemaProp = schemaProp.clone(); - schemaProp.nameInSnakeCase = null; - schemaProp.baseName = toModelName(cp.baseName) + "Schema"; - cp.setSchema(schemaProp); - } - return cp; - } - - private boolean isValidPythonVarOrClassName(String name) { - return name.matches("^[_a-zA-Z][_a-zA-Z0-9]*$"); - } - - - /** - * Convert OAS Property object to Codegen Property object - * We have a custom version of this method to always set allowableValues.enumVars on all enum variables - * Together with unaliasSchema this sets primitive types with validations as models - * This method is used by fromResponse - * - * @param name name of the property - * @param p OAS property schema - * @param required true if the property is required in the next higher object schema, false otherwise - * @param schemaIsFromAdditionalProperties true if the property is defined by additional properties schema - * @return Codegen Property object - */ - @Override - public CodegenProperty fromProperty(String name, Schema p, boolean required, boolean schemaIsFromAdditionalProperties) { - // fix needed for values with /n /t etc in them - String fixedName = handleSpecialCharacters(name); - CodegenProperty cp = super.fromProperty(fixedName, p, required, schemaIsFromAdditionalProperties); - - if (cp.isAnyType && cp.isNullable) { - cp.isNullable = false; - } - if (cp.isNullable && cp.complexType == null) { - cp.setIsNull(true); - cp.isNullable = false; - cp.setHasMultipleTypes(true); - } - if (p.getPattern() != null) { - postProcessPattern(p.getPattern(), cp.vendorExtensions); - } - // if we have a property that has a difficult name, either: - // 1. name is reserved, like class int float - // 2. name is invalid in python like '3rd' or 'Content-Type' - // set cp.nameInSnakeCase to a value so we can tell that we are in this use case - // we handle this in the schema templates - // templates use its presence to handle these badly named variables / keys - if ((isReservedWord(cp.baseName) || !isValidPythonVarOrClassName(cp.baseName)) && !cp.baseName.equals(cp.name)) { - cp.nameInSnakeCase = cp.name; - } else { - cp.nameInSnakeCase = null; - } - if (cp.isEnum) { - updateCodegenPropertyEnum(cp); - } - Schema unaliasedSchema = unaliasSchema(p); - if (cp.isPrimitiveType && unaliasedSchema.get$ref() != null) { - cp.complexType = cp.dataType; - } - return cp; - } - - /** - * checks if the data should be classified as "string" in enum - * e.g. double in C# needs to be double-quoted (e.g. "2.8") by treating it as a string - * In the future, we may rename this function to "isEnumString" - * - * @param dataType data type - * @return true if it's a enum string - */ - @Override - public boolean isDataTypeString(String dataType) { - return "str".equals(dataType); - } - - protected String getItemsName(Schema containingSchema, String containingSchemaName) { - return "items"; - } - - /** - * Update codegen property's enum by adding "enumVars" (with name and value) - * - * @param var list of CodegenProperty - */ - @Override - public void updateCodegenPropertyEnum(CodegenProperty var) { - // we have a custom version of this method to omit overwriting the defaultValue - Map allowableValues = var.allowableValues; - - // handle array - if (var.mostInnerItems != null) { - allowableValues = var.mostInnerItems.allowableValues; - } - - if (allowableValues == null) { - return; - } - - List values = (List) allowableValues.get("values"); - if (values == null) { - return; - } - - String varDataType = var.mostInnerItems != null ? var.mostInnerItems.dataType : var.dataType; - Schema referencedSchema = getModelNameToSchemaCache().get(varDataType); - String dataType = (referencedSchema != null) ? getTypeDeclaration(referencedSchema) : varDataType; - - // put "enumVars" map into `allowableValues", including `name` and `value` - List> enumVars = buildEnumVars(values, dataType); - - // if "x-enum-varnames" or "x-enum-descriptions" defined, update varnames - Map extensions = var.mostInnerItems != null ? var.mostInnerItems.getVendorExtensions() : var.getVendorExtensions(); - if (referencedSchema != null) { - extensions = referencedSchema.getExtensions(); - } - updateEnumVarsWithExtensions(enumVars, extensions, dataType); - allowableValues.put("enumVars", enumVars); - // overwriting defaultValue omitted from here - } - - /*** - * We have a custom version of this method to produce links to models when they are - * primitive type (not map, not array, not object) and include validations or are enums - * - * @param body request body - * @param imports import collection - * @param bodyParameterName body parameter name - * @return the resultant CodegenParameter - */ - @Override - public CodegenParameter fromRequestBody(RequestBody body, Set imports, String bodyParameterName) { - CodegenParameter cp = super.fromRequestBody(body, imports, bodyParameterName); - cp.baseName = "body"; - Schema schema = ModelUtils.getSchemaFromRequestBody(body); - if (schema.get$ref() == null) { - return cp; - } - Schema unaliasedSchema = unaliasSchema(schema); - CodegenProperty unaliasedProp = fromProperty("body", unaliasedSchema, false); - Boolean dataTypeMismatch = !cp.dataType.equals(unaliasedProp.dataType); - Boolean baseTypeMismatch = !cp.baseType.equals(unaliasedProp.complexType) && unaliasedProp.complexType != null; - if (dataTypeMismatch || baseTypeMismatch) { - cp.dataType = unaliasedProp.dataType; - cp.baseType = unaliasedProp.complexType; - } - return cp; - } - - /*** - * Adds the body model schema to the body parameter - * We have a custom version of this method so we can flip forceSimpleRef - * to True based upon the results of unaliasSchema - * With this customization, we ensure that when schemas are passed to getSchemaType - * - if they have ref in them they are a model - * - if they do not have ref in them they are not a model - * and code is also customized to allow anyType request body schemas - * - * @param codegenParameter the body parameter - * @param name model schema ref key in components - * @param schema the model schema (not refed) - * @param imports collection of imports - * @param bodyParameterName body parameter name - * @param forceSimpleRef if true use a model reference - */ - @Override - protected void addBodyModelSchema(CodegenParameter codegenParameter, String name, Schema schema, Set imports, String bodyParameterName, boolean forceSimpleRef) { - if (name != null) { - Schema bodySchema = new Schema().$ref("#/components/schemas/" + name); - Schema unaliased = unaliasSchema(bodySchema); - if (unaliased.get$ref() != null) { - forceSimpleRef = true; - } - } - - CodegenModel codegenModel = null; - if (StringUtils.isNotBlank(name)) { - schema.setName(name); - codegenModel = fromModel(name, schema); - } - - if (codegenModel != null && (codegenModel.hasVars || forceSimpleRef)) { - if (StringUtils.isEmpty(bodyParameterName)) { - codegenParameter.baseName = codegenModel.classname; - } else { - codegenParameter.baseName = bodyParameterName; - } - codegenParameter.paramName = toParamName(codegenParameter.baseName); - codegenParameter.baseType = codegenModel.classname; - codegenParameter.dataType = getTypeDeclaration(codegenModel.classname); - codegenParameter.description = codegenModel.description; - codegenParameter.isNullable = codegenModel.isNullable; - } else { - CodegenProperty codegenProperty = fromProperty("property", schema, false); - - if (ModelUtils.isMapSchema(schema)) {// http body is map - // LOGGER.error("Map should be supported. Please report to openapi-generator github repo about the issue."); - } else if (codegenProperty != null) { - String codegenModelName, codegenModelDescription; - - if (codegenModel != null) { - codegenModelName = codegenModel.classname; - codegenModelDescription = codegenModel.description; - } else { - codegenModelName = "anyType"; - codegenModelDescription = ""; - } - - if (StringUtils.isEmpty(bodyParameterName)) { - codegenParameter.baseName = codegenModelName; - } else { - codegenParameter.baseName = bodyParameterName; - } - - codegenParameter.paramName = toParamName(codegenParameter.baseName); - codegenParameter.baseType = codegenModelName; - codegenParameter.dataType = getTypeDeclaration(codegenModelName); - codegenParameter.description = codegenModelDescription; - } - - // set nullable - setParameterNullable(codegenParameter, codegenProperty); - } - - } - - - /** - * Return the sanitized variable name for enum - * - * @param value enum variable name - * @param datatype data type - * @return the sanitized variable name for enum - */ - public String toEnumVarName(String value, String datatype) { - // our enum var names are keys in a python dict, so change spaces to underscores - if (value.length() == 0) { - return "EMPTY"; - } else if (value.equals("null")) { - return "NONE"; - } - - String intPattern = "^[-\\+]?\\d+$"; - String floatPattern = "^[-\\+]?\\d+\\.\\d+$"; - Boolean intMatch = Pattern.matches(intPattern, value); - Boolean floatMatch = Pattern.matches(floatPattern, value); - if (intMatch || floatMatch) { - String plusSign = "^\\+.+"; - String negSign = "^-.+"; - if (Pattern.matches(plusSign, value)) { - value = value.replace("+", "POSITIVE_"); - } else if (Pattern.matches(negSign, value)) { - value = value.replace("-", "NEGATIVE_"); - } else { - value = "POSITIVE_" + value; - } - if (floatMatch) { - value = value.replace(".", "_PT_"); - } - return value; - } - // Replace " " with _ - String usedValue = value.replaceAll("\\s+", "_"); - // strip first character if it is invalid - int lengthBeforeFirstCharStrip = usedValue.length(); - Character firstChar = usedValue.charAt(0); - usedValue = usedValue.replaceAll("^[^_a-zA-Z]", ""); - boolean firstCharStripped = usedValue.length() == lengthBeforeFirstCharStrip - 1; - // Replace / with _ for path enums - usedValue = usedValue.replaceAll("/", "_"); - // Replace . with _ for tag enums - usedValue = usedValue.replaceAll("\\.", "_"); - // add underscore at camelCase locations - String regex = "([a-z])([A-Z]+)"; - String replacement = "$1_$2"; - usedValue = usedValue.replaceAll(regex, replacement); - // Replace invalid characters with empty space - usedValue = usedValue.replaceAll("[^_a-zA-Z0-9]*", ""); - // uppercase - usedValue = usedValue.toUpperCase(Locale.ROOT); - - if (usedValue.length() == 0) { - for (int i = 0; i < value.length(); i++){ - Character c = value.charAt(i); - String charName = Character.getName(c.hashCode()); - usedValue += charNameToVarName(charName); - } - // remove trailing _ - usedValue = usedValue.replaceAll("[_]$", ""); - } - // check first character to see if it is valid - // if not then add a valid prefix - boolean validFirstChar = Pattern.matches("^[_a-zA-Z]", usedValue.substring(0,1)); - if (!validFirstChar && firstCharStripped) { - String charName = Character.getName(firstChar.hashCode()); - usedValue = charNameToVarName(charName) + "_" + usedValue; - } - - return usedValue; - } - - /** - * Replace - and " " with _ - * Remove SIGN - * - * @param charName - * @return - */ - private String charNameToVarName(String charName) { - String varName = charName.replaceAll("[\\-\\s]", "_"); - varName = varName.replaceAll("SIGN", ""); - return varName; - } - - protected List> buildEnumVars(List values, String dataType) { - List> enumVars = new ArrayList<>(); - int truncateIdx = 0; - - if (isRemoveEnumValuePrefix()) { - String commonPrefix = findCommonPrefixOfVars(values); - truncateIdx = commonPrefix.length(); - } - - for (Object value : values) { - Map enumVar = new HashMap<>(); - String enumName; - if (truncateIdx == 0) { - enumName = String.valueOf(value); - } else { - enumName = value.toString().substring(truncateIdx); - if (enumName.isEmpty()) { - enumName = value.toString(); - } - } - - enumVar.put("name", toEnumVarName(enumName, dataType)); - if (value instanceof Integer) { - enumVar.put("value", value); - } else if (value instanceof Double) { - enumVar.put("value", value); - } else if (value instanceof Long) { - enumVar.put("value", value); - } else if (value instanceof Float) { - enumVar.put("value", value); - } else if (value instanceof BigDecimal) { - enumVar.put("value", value); - } else if (value == null) { - enumVar.put("value", "schemas.NoneClass.NONE"); - } else if (value instanceof Boolean) { - if (value.equals(Boolean.TRUE)) { - enumVar.put("value", "schemas.BoolClass.TRUE"); - } else { - enumVar.put("value", "schemas.BoolClass.FALSE"); - } - } else { - String fixedValue = (String) processTestExampleData(value); - enumVar.put("value", ensureQuotes(fixedValue)); - } - enumVar.put("isString", isDataTypeString(dataType)); - enumVars.add(enumVar); - } - - if (enumUnknownDefaultCase) { - // If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response. - // With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case. - Map enumVar = new HashMap<>(); - String enumName = enumUnknownDefaultCaseName; - - String enumValue; - if (isDataTypeString(dataType)) { - enumValue = enumUnknownDefaultCaseName; - } else { - // This is a dummy value that attempts to avoid collisions with previously specified cases. - // Int.max / 192 - // The number 192 that is used to calculate this random value, is the Swift Evolution proposal for frozen/non-frozen enums. - // [SE-0192](https://github.com/apple/swift-evolution/blob/master/proposals/0192-non-exhaustive-enums.md) - // Since this functionality was born in the Swift 5 generator and latter on broth to all generators - // https://github.com/OpenAPITools/openapi-generator/pull/11013 - enumValue = String.valueOf(11184809); - } - - enumVar.put("name", toEnumVarName(enumName, dataType)); - enumVar.put("value", toEnumValue(enumValue, dataType)); - enumVar.put("isString", isDataTypeString(dataType)); - enumVars.add(enumVar); - } - - return enumVars; - } - - @Override - public void postProcessParameter(CodegenParameter p) { - postProcessPattern(p.pattern, p.vendorExtensions); - if (p.baseType != null && languageSpecificPrimitives.contains(p.baseType)) { - // set baseType to null so the api docs will not point to a model for languageSpecificPrimitives - p.baseType = null; - } - } - - /** - * Sets the value of the 'model.parent' property in CodegenModel - * We have a custom version of this function so we can add the dataType on the ArrayModel - */ - @Override - protected void addParentContainer(CodegenModel model, String name, Schema schema) { - super.addParentContainer(model, name, schema); - - List referencedModelNames = new ArrayList(); - model.dataType = getTypeString(schema, "", "", referencedModelNames); - } - - protected String toTestCaseName(String specTestCaseName) { - return CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, specTestCaseName); - } - - protected String handleSpecialCharacters(String value) { - // handles escape characters and the like - String stringValue = value; - String backslash = "\\"; - if (stringValue.contains(backslash)) { - stringValue = stringValue.replace(backslash, "\\\\"); - } - String nullChar = "\0"; - if (stringValue.contains(nullChar)) { - stringValue = stringValue.replace(nullChar, "\\x00"); - } - String doubleQuoteChar = "\""; - if (stringValue.contains(doubleQuoteChar)) { - stringValue = stringValue.replace(doubleQuoteChar, "\\\""); - } - String lineSep = System.lineSeparator(); - if (stringValue.contains(lineSep)) { - stringValue = stringValue.replace(lineSep, "\\n"); - } - String carriageReturn = "\r"; - if (stringValue.contains(carriageReturn)) { - stringValue = stringValue.replace(carriageReturn, "\\r"); - } - String tab = "\t"; - if (stringValue.contains(tab)) { - stringValue = stringValue.replace(tab, "\\t"); - } - String formFeed = "\f"; - if (stringValue.contains(formFeed)) { - stringValue = stringValue.replace(formFeed, "\\f"); - } - return stringValue; - } - - protected Object processTestExampleData(Object value) { - if (value instanceof Integer){ - return value; - } else if (value instanceof Double || value instanceof Float || value instanceof Boolean){ - return value; - } else if (value instanceof String) { - return handleSpecialCharacters((String) value); - } else if (value instanceof LinkedHashMap) { - LinkedHashMap fixedValues = new LinkedHashMap(); - for (Map.Entry entry: ((LinkedHashMap) value).entrySet()) { - String entryKey = (String) processTestExampleData(entry.getKey()); - Object entryValue = processTestExampleData(entry.getValue()); - fixedValues.put(entryKey, entryValue); - } - return fixedValues; - } else if (value instanceof ArrayList) { - ArrayList fixedValues = (ArrayList) value; - for (int i = 0; i < fixedValues.size(); i++) { - Object item = processTestExampleData(fixedValues.get(i)); - fixedValues.set(i, item); - } - return fixedValues; - } else if (value == null) { - return value; - } - return value; - } - - /** - * Convert OAS Model object to Codegen Model object - * We have a custom version of this method so we can: - * - set the correct regex values for requiredVars + optionalVars - * - set model.defaultValue and model.hasRequired per the three use cases defined in this method - * - * @param name the name of the model - * @param sc OAS Model object - * @return Codegen Model object - */ - @Override - public CodegenModel fromModel(String name, Schema sc) { - CodegenModel cm = super.fromModel(name, sc); - if (sc.getPattern() != null) { - postProcessPattern(sc.getPattern(), cm.vendorExtensions); - String pattern = (String) cm.vendorExtensions.get("x-regex"); - cm.setPattern(pattern); - } - if (cm.isNullable) { - cm.setIsNull(true); - cm.isNullable = false; - cm.setHasMultipleTypes(true); - } - Boolean isNotPythonModelSimpleModel = (ModelUtils.isComposedSchema(sc) || ModelUtils.isObjectSchema(sc) || ModelUtils.isMapSchema(sc)); - if (isNotPythonModelSimpleModel) { - return cm; - } - String defaultValue = toDefaultValue(sc); - if (sc.getDefault() != null) { - cm.defaultValue = defaultValue; - } - return cm; - } - - /** - * Returns the python type for the property. - * - * @param schema property schema - * @return string presentation of the type - **/ - @SuppressWarnings("static-method") - @Override - public String getSchemaType(Schema schema) { - String openAPIType = getSingleSchemaType(schema); - if (typeMapping.containsKey(openAPIType)) { - String type = typeMapping.get(openAPIType); - return type; - } - return toModelName(openAPIType); - } - - public String getModelName(Schema sc) { - if (sc.get$ref() != null) { - Schema unaliasedSchema = unaliasSchema(sc); - if (unaliasedSchema.get$ref() != null) { - return toModelName(ModelUtils.getSimpleRef(sc.get$ref())); - } - } - return null; - } - - /** - * Return a string representation of the Python types for the specified OAS schema. - * Primitive types in the OAS specification are implemented in Python using the corresponding - * Python primitive types. - * Composed types (e.g. allAll, oneOf, anyOf) are represented in Python using list of types. - *

- * The caller should set the prefix and suffix arguments to empty string, except when - * getTypeString invokes itself recursively. A non-empty prefix/suffix may be specified - * to wrap the return value in a python dict, list or tuple. - *

- * Examples: - * - "bool, date, float" The data must be a bool, date or float. - * - "[bool, date]" The data must be an array, and the array items must be a bool or date. - * - * @param p The OAS schema. - * @param prefix prepended to the returned value. - * @param suffix appended to the returned value. - * @param referencedModelNames a list of models that are being referenced while generating the types, - * may be used to generate imports. - * @return a comma-separated string representation of the Python types - */ - private String getTypeString(Schema p, String prefix, String suffix, List referencedModelNames) { - String fullSuffix = suffix; - if (")".equals(suffix)) { - fullSuffix = "," + suffix; - } - if (StringUtils.isNotEmpty(p.get$ref())) { - // The input schema is a reference. If the resolved schema is - // a composed schema, convert the name to a Python class. - Schema unaliasedSchema = unaliasSchema(p); - if (unaliasedSchema.get$ref() != null) { - String modelName = toModelName(ModelUtils.getSimpleRef(p.get$ref())); - if (referencedModelNames != null) { - referencedModelNames.add(modelName); - } - return prefix + modelName + fullSuffix; - } - } - if (ModelUtils.isAnyType(p)) { - return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix; - } - // Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references. - if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) { - fullSuffix = ", none_type" + suffix; - } - if (ModelUtils.isNumberSchema(p)) { - return prefix + "int, float" + fullSuffix; - } else if (ModelUtils.isTypeObjectSchema(p)) { - if (p.getAdditionalProperties() != null && p.getAdditionalProperties().equals(false)) { - if (p.getProperties() == null) { - // type object with no properties and additionalProperties = false, empty dict only - return prefix + "{str: typing.Any}" + fullSuffix; - } else { - // properties only - // TODO add type hints for those properties only as values - return prefix + "{str: typing.Any}" + fullSuffix; - } - } else { - // additionalProperties exists - Schema inner = getAdditionalProperties(p); - return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix; - // TODO add code here to add property values too if they exist - } - } else if (ModelUtils.isArraySchema(p)) { - ArraySchema ap = (ArraySchema) p; - Schema inner = ap.getItems(); - if (inner == null) { - // In OAS 3.0.x, the array "items" attribute is required. - // In OAS >= 3.1, the array "items" attribute is optional such that the OAS - // specification is aligned with the JSON schema specification. - // When "items" is not specified, the elements of the array may be anything at all. - // In that case, the return value should be: - // "[bool, date, datetime, dict, float, int, list, str, none_type]" - // Using recursion to wrap the allowed python types in an array. - Schema anyType = new Schema(); // A Schema without any attribute represents 'any type'. - return getTypeString(anyType, "[", "]", referencedModelNames); - } else { - return prefix + getTypeString(inner, "[", "]", referencedModelNames) + fullSuffix; - } - } else if (ModelUtils.isFileSchema(p)) { - return prefix + "file_type" + fullSuffix; - } - String baseType = getSchemaType(p); - return prefix + baseType + fullSuffix; - } - - /** - * Output the type declaration of a given name - * - * @param p property schema - * @return a string presentation of the type - */ - @Override - public String getTypeDeclaration(Schema p) { - // this is used to set dataType, which defines a python tuple of classes - // in Python we will wrap this in () to make it a tuple but here we - // will omit the parens so the generated documentation will not include - // them - return getTypeString(p, "", "", null); - } - - @Override - public String toInstantiationType(Schema property) { - if (ModelUtils.isArraySchema(property) || ModelUtils.isMapSchema(property) || property.getAdditionalProperties() != null) { - return getSchemaType(property); - } - return super.toInstantiationType(property); - } - - @Override - protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel, Schema schema) { - } - - /** - * Gets an example if it exists - * - * @param sc input schema - * @return the example value - */ - protected Object getObjectExample(Schema sc) { - Schema schema = sc; - String ref = sc.get$ref(); - if (ref != null) { - schema = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); - } - // TODO handle examples in object models in the future - Boolean objectModel = (ModelUtils.isObjectSchema(schema) || ModelUtils.isMapSchema(schema) || ModelUtils.isComposedSchema(schema)); - if (objectModel) { - return null; - } - if (schema.getExample() != null) { - return schema.getExample(); - } - if (schema.getDefault() != null) { - return schema.getDefault(); - } else if (schema.getEnum() != null && !schema.getEnum().isEmpty()) { - return schema.getEnum().get(0); - } - return null; - } - - /*** - * Ensures that the string has a leading and trailing quote - * - * @param in input string - * @return quoted string - */ - private String ensureQuotes(String in) { - String strPattern = "^['\"].*?['\"]$"; - if (in.matches(strPattern)) { - return in; - } - return "\"" + in + "\""; - } - - @Override - public String toExampleValue(Schema schema) { - String modelName = getModelName(schema); - Object objExample = getObjectExample(schema); - return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, new ArrayList<>()); - } - - public String toExampleValue(Schema schema, Object objExample) { - String modelName = getModelName(schema); - return toExampleValueRecursive(modelName, schema, objExample, 1, "", 0, new ArrayList<>()); - } - - private Boolean simpleStringSchema(Schema schema) { - Schema sc = schema; - String ref = schema.get$ref(); - if (ref != null) { - sc = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); - } - if (ModelUtils.isStringSchema(sc) && !ModelUtils.isDateSchema(sc) && !ModelUtils.isDateTimeSchema(sc) && !"Number".equalsIgnoreCase(sc.getFormat()) && !ModelUtils.isByteArraySchema(sc) && !ModelUtils.isBinarySchema(sc) && schema.getPattern() == null) { - return true; - } - return false; - } - - private MappedModel getDiscriminatorMappedModel(CodegenDiscriminator disc) { - for (MappedModel mm : disc.getMappedModels()) { - String modelName = mm.getModelName(); - Schema modelSchema = getModelNameToSchemaCache().get(modelName); - if (ModelUtils.isObjectSchema(modelSchema)) { - return mm; - } - } - return null; - } - - /*** - * Recursively generates string examples for schemas - * - * @param modelName the string name of the refed model that will be generated for the schema or null - * @param schema the schema that we need an example for - * @param objExample the example that applies to this schema, for now only string example are used - * @param indentationLevel integer indentation level that we are currently at - * we assume the indentation amount is 4 spaces times this integer - * @param prefix the string prefix that we will use when assigning an example for this line - * this is used when setting key: value, pairs "key: " is the prefix - * and this is used when setting properties like some_property='some_property_example' - * @param exampleLine this is the current line that we are generating an example for, starts at 0 - * we don't indent the 0th line because using the example value looks like: - * prop = ModelName( line 0 - * some_property='some_property_example' line 1 - * ) line 2 - * and our example value is: - * ModelName( line 0 - * some_property='some_property_example' line 1 - * ) line 2 - * @param includedSchemas are a list of schemas that we have moved through to get here. If the new schemas that we - * are looking at is in includedSchemas then we have hit a cycle. - * @return the string example - */ - private String toExampleValueRecursive(String modelName, Schema schema, Object objExample, int indentationLevel, String prefix, Integer exampleLine, List includedSchemas) { - boolean couldHaveCycle = includedSchemas.size() > 0 && potentiallySelfReferencingSchema(schema); - // If we have seen the ContextAwareSchemaNode more than once before, we must be in a cycle. - boolean cycleFound = false; - if (couldHaveCycle) { - cycleFound = includedSchemas.subList(0, includedSchemas.size()-1).stream().anyMatch(s -> schema.equals(s)); - } - final String indentionConst = " "; - String currentIndentation = ""; - String closingIndentation = ""; - for (int i = 0; i < indentationLevel; i++) currentIndentation += indentionConst; - if (exampleLine.equals(0)) { - closingIndentation = currentIndentation; - currentIndentation = ""; - } else { - closingIndentation = currentIndentation; - } - String openChars = ""; - String closeChars = ""; - if (modelName != null) { - openChars = modelName + "("; - closeChars = ")"; - } - - String fullPrefix = currentIndentation + prefix + openChars; - - String example = null; - if (objExample != null) { - example = objExample.toString(); - } - if (null != schema.get$ref()) { - Map allDefinitions = ModelUtils.getSchemas(this.openAPI); - String ref = ModelUtils.getSimpleRef(schema.get$ref()); - Schema refSchema = allDefinitions.get(ref); - if (null == refSchema) { - LOGGER.warn("Unable to find referenced schema " + schema.get$ref() + "\n"); - return fullPrefix + "None" + closeChars; - } - String refModelName = getModelName(schema); - return toExampleValueRecursive(refModelName, refSchema, objExample, indentationLevel, prefix, exampleLine, includedSchemas); - } else if (ModelUtils.isNullType(schema)) { - // The 'null' type is allowed in OAS 3.1 and above. It is not supported by OAS 3.0.x, - // though this tooling supports it. - return fullPrefix + "None" + closeChars; - } else if (ModelUtils.isAnyType(schema)) { - /* - This schema may be a composed schema - TODO generate examples for some of these use cases in the future like - only oneOf without a discriminator - */ - if (cycleFound) { - return ""; - } - Boolean hasProperties = (schema.getProperties() != null && !schema.getProperties().isEmpty()); - CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); - if (ModelUtils.isComposedSchema(schema)) { - if(includedSchemas.contains(schema)) { - return ""; - } - includedSchemas.add(schema); - // complex composed object type schemas not yet handled and the code returns early - if (hasProperties) { - // what if this composed schema defined properties + allOf? - // or items + properties, both a ist and a dict could be accepted as payloads - return fullPrefix + "{}" + closeChars; - } - ComposedSchema cs = (ComposedSchema) schema; - Integer allOfExists = 0; - if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { - allOfExists = 1; - } - Integer anyOfExists = 0; - if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { - anyOfExists = 1; - } - Integer oneOfExists = 0; - if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { - oneOfExists = 1; - } - if (allOfExists + anyOfExists + oneOfExists > 1) { - // what if it needs one oneOf schema, one anyOf schema, and two allOf schemas? - return fullPrefix + "None" + closeChars; - } - // for now only oneOf with discriminator is supported - if (oneOfExists == 1 && disc != null) { - ; - } else { - return fullPrefix + "None" + closeChars; - } - } - if (disc != null) { - // a discriminator means that the type must be object - MappedModel mm = getDiscriminatorMappedModel(disc); - if (mm == null) { - return fullPrefix + "None" + closeChars; - } - String discPropNameValue = mm.getMappingName(); - String chosenModelName = mm.getModelName(); - Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); - CodegenProperty cp = new CodegenProperty(); - cp.setName(disc.getPropertyName()); - cp.setExample(discPropNameValue); - return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); - } - return fullPrefix + "None" + closeChars; - } else if (ModelUtils.isBooleanSchema(schema)) { - if (example == null) { - example = "True"; - } else { - if ("false".equalsIgnoreCase(objExample.toString())) { - example = "False"; - } else { - example = "True"; - } - } - return fullPrefix + example + closeChars; - } else if (ModelUtils.isStringSchema(schema)) { - if (example != null) { - return fullPrefix + ensureQuotes(handleSpecialCharacters(example)) + closeChars; - } - if (ModelUtils.isDateSchema(schema)) { - if (objExample == null) { - example = pythonDate("1970-01-01"); - } else { - example = pythonDate(objExample); - } - } else if (ModelUtils.isDateTimeSchema(schema)) { - if (objExample == null) { - example = pythonDateTime("1970-01-01T00:00:00.00Z"); - } else { - example = pythonDateTime(objExample); - } - } else if (ModelUtils.isBinarySchema(schema)) { - if (example == null) { - example = "/path/to/file"; - } - example = "open('" + example + "', 'rb')"; - return fullPrefix + example + closeChars; - } else if (ModelUtils.isByteArraySchema(schema)) { - if (objExample == null) { - example = "'YQ=='"; - } - } else if ("Number".equalsIgnoreCase(schema.getFormat())) { - // a BigDecimal: - example = "2"; - } else if (StringUtils.isNotBlank(schema.getPattern())) { - String pattern = schema.getPattern(); - List results = getPatternAndModifiers(pattern); - String extractedPattern = (String) results.get(0); - List regexFlags = (List) results.get(1); - /* - RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 - So strip off the leading / and trailing / and turn on ignore case if we have it - */ - RgxGen rgxGen = null; - if (regexFlags.size() > 0 && regexFlags.contains("i")) { - rgxGen = new RgxGen(extractedPattern); - RgxGenProperties properties = new RgxGenProperties(); - RgxGenOption.CASE_INSENSITIVE.setInProperties(properties, true); - rgxGen.setProperties(properties); - } else { - rgxGen = new RgxGen(extractedPattern); - } - - // this seed makes it so if we have [a-z] we pick a - Random random = new Random(18); - if (rgxGen != null) { - example = rgxGen.generate(random); - } else { - throw new RuntimeException("rgxGen cannot be null. Please open an issue in the openapi-generator github repo."); - } - } else if (schema.getMinLength() != null) { - example = ""; - int len = schema.getMinLength().intValue(); - for (int i = 0; i < len; i++) example += "a"; - } else if (ModelUtils.isUUIDSchema(schema)) { - example = "046b6c7f-0b8a-43b9-b35d-6489e6daee91"; - } else { - example = "string_example"; - } - return fullPrefix + ensureQuotes(example) + closeChars; - } else if (ModelUtils.isIntegerSchema(schema)) { - if (objExample == null) { - if (schema.getMinimum() != null) { - example = schema.getMinimum().toString(); - } else { - example = "1"; - } - } - return fullPrefix + example + closeChars; - } else if (ModelUtils.isNumberSchema(schema)) { - if (objExample == null) { - if (schema.getMinimum() != null) { - example = schema.getMinimum().toString(); - } else { - example = "3.14"; - } - } - return fullPrefix + example + closeChars; - } else if (ModelUtils.isArraySchema(schema)) { - if (objExample instanceof Iterable) { - // If the example is already a list, return it directly instead of wrongly wrap it in another list - return fullPrefix + objExample.toString() + closeChars; - } - if (ModelUtils.isComposedSchema(schema)) { - // complex composed array type schemas not yet handled and the code returns early - return fullPrefix + "[]" + closeChars; - } - ArraySchema arrayschema = (ArraySchema) schema; - Schema itemSchema = arrayschema.getItems(); - String itemModelName = getModelName(itemSchema); - if(includedSchemas.contains(schema)) { - return ""; - } - includedSchemas.add(schema); - String itemExample = toExampleValueRecursive(itemModelName, itemSchema, objExample, indentationLevel + 1, "", exampleLine + 1, includedSchemas); - if (StringUtils.isEmpty(itemExample) || cycleFound) { - return fullPrefix + "[]" + closeChars; - } else { - return fullPrefix + "[" + "\n" + itemExample + "\n" + closingIndentation + "]" + closeChars; - } - } else if (ModelUtils.isTypeObjectSchema(schema)) { - if (modelName == null) { - fullPrefix += "dict("; - closeChars = ")"; - } - if (cycleFound) { - return fullPrefix + closeChars; - } - Boolean hasProperties = (schema.getProperties() != null && !schema.getProperties().isEmpty()); - CodegenDiscriminator disc = createDiscriminator(modelName, schema, openAPI); - if (ModelUtils.isComposedSchema(schema)) { - // complex composed object type schemas not yet handled and the code returns early - if (hasProperties) { - // what if this composed schema defined properties + allOf? - return fullPrefix + closeChars; - } - ComposedSchema cs = (ComposedSchema) schema; - Integer allOfExists = 0; - if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { - allOfExists = 1; - } - Integer anyOfExists = 0; - if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { - anyOfExists = 1; - } - Integer oneOfExists = 0; - if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { - oneOfExists = 1; - } - if (allOfExists + anyOfExists + oneOfExists > 1) { - // what if it needs one oneOf schema, one anyOf schema, and two allOf schemas? - return fullPrefix + closeChars; - } - // for now only oneOf with discriminator is supported - if (oneOfExists == 1 && disc != null) { - ; - } else { - return fullPrefix + closeChars; - } - } - if (disc != null) { - MappedModel mm = getDiscriminatorMappedModel(disc); - if (mm == null) { - return fullPrefix + closeChars; - } - String discPropNameValue = mm.getMappingName(); - String chosenModelName = mm.getModelName(); - Schema modelSchema = getModelNameToSchemaCache().get(chosenModelName); - CodegenProperty cp = new CodegenProperty(); - cp.setName(disc.getPropertyName()); - cp.setExample(discPropNameValue); - return exampleForObjectModel(modelSchema, fullPrefix, closeChars, cp, indentationLevel, exampleLine, closingIndentation, includedSchemas); - } - Object addPropsObj = schema.getAdditionalProperties(); - if (hasProperties) { - return exampleForObjectModel(schema, fullPrefix, closeChars, null, indentationLevel, exampleLine, closingIndentation, includedSchemas); - } else if (addPropsObj instanceof Schema) { - // TODO handle true case for additionalProperties - Schema addPropsSchema = (Schema) addPropsObj; - String key = "key"; - Object addPropsExample = getObjectExample(addPropsSchema); - if (addPropsSchema.getEnum() != null && !addPropsSchema.getEnum().isEmpty()) { - key = addPropsSchema.getEnum().get(0).toString(); - } - addPropsExample = exampleFromStringOrArraySchema(addPropsSchema, addPropsExample, key); - String addPropPrefix = key + "="; - if (modelName == null) { - addPropPrefix = ensureQuotes(key) + ": "; - } - String addPropsModelName = getModelName(addPropsSchema); - if(includedSchemas.contains(schema)) { - return ""; - } - includedSchemas.add(schema); - - example = fullPrefix + "\n" + toExampleValueRecursive(addPropsModelName, addPropsSchema, addPropsExample, indentationLevel + 1, addPropPrefix, exampleLine + 1, includedSchemas) + ",\n" + closingIndentation + closeChars; - } else { - example = fullPrefix + closeChars; - } - } else { - LOGGER.warn("Type " + schema.getType() + " not handled properly in toExampleValue"); - } - - return example; - } - - private boolean potentiallySelfReferencingSchema(Schema schema) { - return null != schema.get$ref() || ModelUtils.isArraySchema(schema) || ModelUtils.isMapSchema(schema) || ModelUtils.isObjectSchema(schema) || ModelUtils.isComposedSchema(schema); - } - - private String exampleForObjectModel(Schema schema, String fullPrefix, String closeChars, CodegenProperty discProp, int indentationLevel, int exampleLine, String closingIndentation, List includedSchemas) { - - Map requiredAndOptionalProps = schema.getProperties(); - if (requiredAndOptionalProps == null || requiredAndOptionalProps.isEmpty()) { - return fullPrefix + closeChars; - } - - if(includedSchemas.contains(schema)) { - return ""; - } - includedSchemas.add(schema); - - String example = fullPrefix + "\n"; - - for (Map.Entry entry : requiredAndOptionalProps.entrySet()) { - String propName = entry.getKey(); - Schema propSchema = entry.getValue(); - propName = toVarName(propName); - String propModelName = null; - Object propExample = null; - if (discProp != null && propName.equals(discProp.name)) { - propModelName = null; - propExample = discProp.example; - } else { - propModelName = getModelName(propSchema); - propExample = exampleFromStringOrArraySchema( - propSchema, - null, - propName); - } - - example += toExampleValueRecursive(propModelName, - propSchema, - propExample, - indentationLevel + 1, - propName + "=", - exampleLine + 1, - includedSchemas) + ",\n"; - } - - // TODO handle additionalProperties also - example += closingIndentation + closeChars; - return example; - - } - - private Object exampleFromStringOrArraySchema(Schema sc, Object currentExample, String propName) { - if (currentExample != null) { - return currentExample; - } - Schema schema = sc; - String ref = sc.get$ref(); - if (ref != null) { - schema = ModelUtils.getSchema(this.openAPI, ModelUtils.getSimpleRef(ref)); - } - Object example = getObjectExample(schema); - if (example != null) { - return example; - } else if (simpleStringSchema(schema)) { - return propName + "_example"; - } else if (ModelUtils.isArraySchema(schema)) { - ArraySchema arraySchema = (ArraySchema) schema; - Schema itemSchema = arraySchema.getItems(); - example = getObjectExample(itemSchema); - if (example != null) { - return example; - } else if (simpleStringSchema(itemSchema)) { - return propName + "_example"; - } - } - return null; - } - - - /*** - * - * Set the codegenParameter example value - * We have a custom version of this function so we can invoke toExampleValue - * - * @param codegenParameter the item we are setting the example on - * @param parameter the base parameter that came from the spec - */ - @Override - public void setParameterExampleValue(CodegenParameter codegenParameter, Parameter parameter) { - Schema schema = parameter.getSchema(); - if (schema == null) { - LOGGER.warn("CodegenParameter.example defaulting to null because parameter lacks a schema"); - return; - } - - Object example = null; - if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { - example = codegenParameter.vendorExtensions.get("x-example"); - } else if (parameter.getExample() != null) { - example = parameter.getExample(); - } else if (parameter.getExamples() != null && !parameter.getExamples().isEmpty() && parameter.getExamples().values().iterator().next().getValue() != null) { - example = parameter.getExamples().values().iterator().next().getValue(); - } else { - example = getObjectExample(schema); - } - example = exampleFromStringOrArraySchema(schema, example, parameter.getName()); - String finalExample = toExampleValue(schema, example); - codegenParameter.example = finalExample; - } - - /** - * Return the example value of the parameter. - * - * @param codegenParameter Codegen parameter - * @param requestBody Request body - */ - @Override - public void setParameterExampleValue(CodegenParameter codegenParameter, RequestBody requestBody) { - if (codegenParameter.vendorExtensions != null && codegenParameter.vendorExtensions.containsKey("x-example")) { - codegenParameter.example = Json.pretty(codegenParameter.vendorExtensions.get("x-example")); - } - - Content content = requestBody.getContent(); - - if (content.size() > 1) { - // @see ModelUtils.getSchemaFromContent() - once(LOGGER).warn("Multiple MediaTypes found, using only the first one"); - } - - MediaType mediaType = content.values().iterator().next(); - Schema schema = mediaType.getSchema(); - if (schema == null) { - LOGGER.warn("CodegenParameter.example defaulting to null because requestBody content lacks a schema"); - return; - } - - Object example = null; - if (mediaType.getExample() != null) { - example = mediaType.getExample(); - } else if (mediaType.getExamples() != null && !mediaType.getExamples().isEmpty() && mediaType.getExamples().values().iterator().next().getValue() != null) { - example = mediaType.getExamples().values().iterator().next().getValue(); - } else { - example = getObjectExample(schema); - } - example = exampleFromStringOrArraySchema(schema, example, codegenParameter.paramName); - codegenParameter.example = toExampleValue(schema, example); - } - - /** - * Create a CodegenParameter for a Form Property - * We have a custom version of this method so we can invoke - * setParameterExampleValue(codegenParameter, parameter) - * rather than setParameterExampleValue(codegenParameter) - * This ensures that all of our samples are generated in - * toExampleValueRecursive - * - * @param name the property name - * @param propertySchema the property schema - * @param imports our import set - * @return the resultant CodegenParameter - */ - @Override - public CodegenParameter fromFormProperty(String name, Schema propertySchema, Set imports) { - CodegenParameter cp = super.fromFormProperty(name, propertySchema, imports); - Parameter p = new Parameter(); - p.setSchema(propertySchema); - p.setName(cp.paramName); - setParameterExampleValue(cp, p); - return cp; - } - - /** - * Return a map from model name to Schema for efficient lookup. - * - * @return map from model name to Schema. - */ - protected Map getModelNameToSchemaCache() { - if (modelNameToSchemaCache == null) { - // Create a cache to efficiently lookup schema based on model name. - Map m = new HashMap(); - ModelUtils.getSchemas(openAPI).forEach((key, schema) -> { - m.put(toModelName(key), schema); - }); - modelNameToSchemaCache = Collections.unmodifiableMap(m); - } - return modelNameToSchemaCache; - } - - /** - * Use cases: - * additional properties is unset: do nothing - * additional properties is true: add definition to property - * additional properties is false: add definition to property - * additional properties is schema: add definition to property - * - * @param schema the schema that may contain an additional property schema - * @param property the property for the above schema - */ - @Override - protected void setAddProps(Schema schema, IJsonSchemaValidationProperties property){ - Schema addPropsSchema = getSchemaFromBooleanOrSchema(schema.getAdditionalProperties()); - if (addPropsSchema == null) { - return; - } - CodegenProperty addPropProp = fromProperty(getAdditionalPropertiesName(), addPropsSchema, false, false); - property.setAdditionalProperties(addPropProp); - } - - /** - * Update property for array(list) container - * - * @param property Codegen property - * @param innerProperty Codegen inner property of map or list - */ - @Override - protected void updatePropertyForArray(CodegenProperty property, CodegenProperty innerProperty) { - if (innerProperty == null) { - if(LOGGER.isWarnEnabled()) { - LOGGER.warn("skipping invalid array property {}", Json.pretty(property)); - } - return; - } - property.dataFormat = innerProperty.dataFormat; - if (languageSpecificPrimitives.contains(innerProperty.baseType)) { - property.isPrimitiveType = true; - } - property.items = innerProperty; - property.mostInnerItems = getMostInnerItems(innerProperty); - // inner item is Enum - if (isPropertyInnerMostEnum(property)) { - // isEnum is set to true when the type is an enum - // or the inner type of an array/map is an enum - property.isEnum = true; - // update datatypeWithEnum and default value for array - // e.g. List => List - updateDataTypeWithEnumForArray(property); - // set allowable values to enum values (including array/map of enum) - property.allowableValues = getInnerEnumAllowableValues(property); - } - - } - - /** - * Sets the booleans that define the model's type - * - * @param model the model to update - * @param schema the model's schema - */ - protected void updateModelForString(CodegenModel model, Schema schema) { - if (ModelUtils.isDateTimeSchema(schema)) { - // isString stays true, format stores that this is a date-time - } else if (ModelUtils.isDateSchema(schema)) { - // isString stays true, format stores that this is a date - } else if (ModelUtils.isUUIDSchema(schema)) { - // isString stays true, format stores that this is a uuid - } else if (ModelUtils.isDecimalSchema(schema)) { - // isString stays true, format stores that this is a uuid - } else if (ModelUtils.isBinarySchema(schema)) { - // format stores that this is binary - model.isString = true; - } - } - - protected void updateModelForNumber(CodegenModel model, Schema schema) { - model.setIsNumber(true); - // float vs double info is stored in format - } - - protected void updateModelForInteger(CodegenModel model, Schema schema) { - model.isInteger = true; - // int32 int64 info is stored in format - } - - protected void updatePropertyForString(CodegenProperty property, Schema p) { - if (ModelUtils.isByteArraySchema(p)) { - // isString stays true, format stores that this is a byte - } else if (ModelUtils.isBinarySchema(p)) { - // format stores that this is binary - property.isString = true; - } else if (ModelUtils.isUUIDSchema(p)) { - // isString stays true, format stores that this is a uuid - } else if (ModelUtils.isURISchema(p)) { - property.isUri = true; - } else if (ModelUtils.isEmailSchema(p)) { - property.isEmail = true; - } else if (ModelUtils.isDateSchema(p)) { // date format - // isString stays true, format stores that this is a date - } else if (ModelUtils.isDateTimeSchema(p)) { // date-time format - // isString stays true, format stores that this is a date-time - } else if (ModelUtils.isDecimalSchema(p)) { // type: string, format: number - // isString stays true, format stores that this is a number - } - property.pattern = toRegularExpression(p.getPattern()); - } - - @Override - public String toRegularExpression(String pattern) { - if (pattern == null) { - return null; - } - List results = getPatternAndModifiers(pattern); - String extractedPattern = (String) results.get(0); - return extractedPattern; - } - - protected void updatePropertyForNumber(CodegenProperty property, Schema p) { - property.setIsNumber(true); - // float and double differentiation is determined with format info - } - - protected void updatePropertyForInteger(CodegenProperty property, Schema p) { - property.isInteger = true; - // int32 and int64 differentiation is determined with format info - } - - - @Override - protected void updatePropertyForObject(CodegenProperty property, Schema p) { - addVarsRequiredVarsAdditionalProps(p, property); - } - - @Override - protected void updatePropertyForAnyType(CodegenProperty property, Schema p) { - // The 'null' value is allowed when the OAS schema is 'any type'. - // See https://github.com/OAI/OpenAPI-Specification/issues/1389 - if (Boolean.FALSE.equals(p.getNullable())) { - LOGGER.warn("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", p.getName()); - } - addVarsRequiredVarsAdditionalProps(p, property); - } - - @Override - protected void updateModelForObject(CodegenModel m, Schema schema) { - // custom version of this method so properties are always added with addVars - if (schema.getProperties() != null || schema.getRequired() != null) { - // passing null to allProperties and allRequired as there's no parent - addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); - } - // an object or anyType composed schema that has additionalProperties set - addAdditionPropertiesToCodeGenModel(m, schema); - // process 'additionalProperties' - setAddProps(schema, m); - addRequiredVarsMap(schema, m); - } - - @Override - protected void updateModelForAnyType(CodegenModel m, Schema schema) { - // The 'null' value is allowed when the OAS schema is 'any type'. - // See https://github.com/OAI/OpenAPI-Specification/issues/1389 - if (Boolean.FALSE.equals(schema.getNullable())) { - LOGGER.error("Schema '{}' is any type, which includes the 'null' value. 'nullable' cannot be set to 'false'", m.name); - } - // todo add items support here in the future - if (schema.getProperties() != null || schema.getRequired() != null) { - // passing null to allProperties and allRequired as there's no parent - addVars(m, unaliasPropertySchema(schema.getProperties()), schema.getRequired(), null, null); - } - addAdditionPropertiesToCodeGenModel(m, schema); - // process 'additionalProperties' - setAddProps(schema, m); - addRequiredVarsMap(schema, m); - } - - @Override - protected void updateModelForComposedSchema(CodegenModel m, Schema schema, Map allDefinitions) { - final ComposedSchema composed = (ComposedSchema) schema; - - // TODO revise the logic below to set discriminator, xml attributes - if (composed.getAllOf() != null) { - int modelImplCnt = 0; // only one inline object allowed in a ComposedModel - int modelDiscriminators = 0; // only one discriminator allowed in a ComposedModel - for (Schema innerSchema : composed.getAllOf()) { // TODO need to work with anyOf, oneOf as well - if (m.discriminator == null && innerSchema.getDiscriminator() != null) { - LOGGER.debug("discriminator is set to null (not correctly set earlier): {}", m.name); - m.setDiscriminator(createDiscriminator(m.name, innerSchema, this.openAPI)); - // directly include the function `addDiscriminatorMappedModelsImports` inline below - // as the function has been updated - //m.addDiscriminatorMappedModelsImports(); - if (!this.getLegacyDiscriminatorBehavior()) { - if (m.discriminator != null && m.discriminator.getMappedModels() != null) { - for (CodegenDiscriminator.MappedModel mm : m.discriminator.getMappedModels()) { - if (!"".equals(mm.getModelName())) { - m.getImports().add(mm.getModelName()); - } - } - } - } - modelDiscriminators++; - } - - if (innerSchema.getXml() != null) { - m.xmlPrefix = innerSchema.getXml().getPrefix(); - m.xmlNamespace = innerSchema.getXml().getNamespace(); - m.xmlName = innerSchema.getXml().getName(); - } - if (modelDiscriminators > 1) { - LOGGER.error("Allof composed schema is inheriting >1 discriminator. Only use one discriminator: {}", composed); - } - - if (modelImplCnt++ > 1) { - LOGGER.warn("More than one inline schema specified in allOf:. Only the first one is recognized. All others are ignored."); - break; // only one schema with discriminator allowed in allOf - } - } - } - - CodegenComposedSchemas cs = m.getComposedSchemas(); - if (cs != null) { - if (cs.getAllOf() != null && !cs.getAllOf().isEmpty()) { - for (CodegenProperty cp: cs.getAllOf()) { - if (cp.complexType != null) { - addImport(m, cp.complexType); - } - } - } - if (cs.getOneOf() != null && !cs.getOneOf().isEmpty()) { - for (CodegenProperty cp: cs.getOneOf()) { - if (cp.complexType != null) { - addImport(m, cp.complexType); - } - } - } - if (cs.getAnyOf() != null && !cs.getAnyOf().isEmpty()) { - for (CodegenProperty cp: cs.getAnyOf()) { - if (cp.complexType != null) { - addImport(m, cp.complexType); - } - } - } - } - } - - @Override - public ModelsMap postProcessModels(ModelsMap objs) { - // process enum in models - return postProcessModelsEnum(objs); - } - - /** - * @param pattern the regex pattern - * @return List> - */ - private List getPatternAndModifiers(String pattern) { - /* - Notes: - RxGen does not support our ECMA dialect https://github.com/curious-odd-man/RgxGen/issues/56 - So strip off the leading / and trailing / and turn on ignore case if we have it - - json schema test cases omit the leading and trailing /s, so make sure that the regex allows that - */ - Pattern valueExtractor = Pattern.compile("^/?(.+?)/?([simu]{0,4})$"); - Matcher m = valueExtractor.matcher(pattern); - if (m.find()) { - int groupCount = m.groupCount(); - if (groupCount == 1) { - // only pattern found - String isolatedPattern = m.group(1); - return Arrays.asList(isolatedPattern, null); - } else if (groupCount == 2) { - List modifiers = new ArrayList(); - // patterns and flag found - String isolatedPattern = m.group(1); - String flags = m.group(2); - if (flags.contains("s")) { - modifiers.add("DOTALL"); - } - if (flags.contains("i")) { - modifiers.add("IGNORECASE"); - } - if (flags.contains("m")) { - modifiers.add("MULTILINE"); - } - return Arrays.asList(isolatedPattern, modifiers); - } - } - return Arrays.asList(pattern, new ArrayList()); - } - - /* - * The OpenAPI pattern spec follows the Perl convention and style of modifiers. Python - * does not support this in as natural a way so it needs to convert it. See - * https://docs.python.org/2/howto/regex.html#compilation-flags for details. - */ - public void postProcessPattern(String pattern, Map vendorExtensions) { - if (pattern != null) { - List results = getPatternAndModifiers(pattern); - String extractedPattern = (String) results.get(0); - List modifiers = (List) results.get(1); - - vendorExtensions.put("x-regex", extractedPattern); - if (modifiers.size() > 0) { - vendorExtensions.put("x-modifiers", modifiers); - } - } - } - - @Override - public CodegenType getTag() { - return CodegenType.CLIENT; - } - - @Override - public String apiDocFileFolder() { - return (outputFolder + "/" + apiDocPath); - } - - @Override - public String modelDocFileFolder() { - return (outputFolder + "/" + modelDocPath); - } - - @Override - public String toModelDocFilename(String name) { - return toModelName(name); - } - - @Override - public String toApiDocFilename(String name) { - return toApiName(name); - } - - @Override - public String addRegularExpressionDelimiter(String pattern) { - if (StringUtils.isEmpty(pattern)) { - return pattern; - } - - if (!pattern.matches("^/.*")) { - // Perform a negative lookbehind on each `/` to ensure that it is escaped. - return "/" + pattern.replaceAll("(? - * (PEP 0008) Python packages should also have short, all-lowercase names, - * although the use of underscores is discouraged. - * - * @param packageName Package name - * @return Python package name that conforms to PEP 0008 - */ - @SuppressWarnings("static-method") - public String generatePackageName(String packageName) { - return underscore(packageName.replaceAll("[^\\w]+", "")); - } - - /** - * A custom version of this method is needed to ensure that the form object parameter is kept as-is - * as an object and is not exploded into separate parameters - * @param body the body that is being handled - * @param imports the imports for this body - * @return the list of length one containing a single type object CodegenParameter - */ - @Override - public List fromRequestBodyToFormParameters(RequestBody body, Set imports) { - List parameters = new ArrayList<>(); - LOGGER.debug("debugging fromRequestBodyToFormParameters= {}", body); - Schema schema = ModelUtils.getSchemaFromRequestBody(body); - schema = ModelUtils.getReferencedSchema(this.openAPI, schema); - CodegenParameter cp = fromFormProperty("body", schema, imports); - cp.setContent(getContent(body.getContent(), imports, "RequestBody")); - cp.isFormParam = false; - cp.isBodyParam = true; - parameters.add(cp); - return parameters; - } - - /** - * Custom version of this method so we can move the body parameter into bodyParam - * - * @param path the path of the operation - * @param httpMethod HTTP method - * @param operation OAS operation object - * @param servers list of servers - * @return the resultant CodegenOperation instance - */ - @Override - public CodegenOperation fromOperation(String path, - String httpMethod, - Operation operation, - List servers) { - CodegenOperation co = super.fromOperation(path, httpMethod, operation, servers); - co.httpMethod = httpMethod.toLowerCase(Locale.ROOT); - // smuggle the path enum variable name in operationIdLowerCase - co.operationIdLowerCase = toEnumVarName(co.path, "str"); - // smuggle pathModuleName in nickname - String pathModuleName = toVarName(path); - co.nickname = pathModuleName; - // smuggle path Api class name ins operationIdSnakeCase - co.operationIdSnakeCase = toModelName(path); - - if (co.bodyParam == null) { - for (CodegenParameter cp: co.allParams) { - if (cp.isBodyParam) { - co.bodyParam = cp; - co.bodyParams.add(cp); - } - } - } - return co; - } - - /** - * Custom version of this method to prevent mutation of - * codegenOperation.operationIdLowerCase/operationIdSnakeCase - * Property Usages: - * - operationId: endpoint method name when using tagged apis - * - httpMethod: endpoint method name when using path apis - * - operationIdCamelCase: Api class name containing single endpoint for tagged apis - * - operationIdLowerCase: (smuggled) path enum variable name - * - nickname: (smuggled) path module name for path apis - * - operationIdSnakeCase: (smuggled) path Api class name when using path apis - * - * @param tag name of the tag - * @param resourcePath path of the resource - * @param operation OAS Operation object - * @param co Codegen Operation object - * @param operations map of Codegen operations - */ - @Override - @SuppressWarnings("static-method") - public void addOperationToGroup(String tag, String resourcePath, Operation operation, CodegenOperation - co, Map> operations) { - List opList = operations.get(tag); - if (opList == null) { - opList = new ArrayList<>(); - operations.put(tag, opList); - } - // check for operationId uniqueness - String uniqueName = co.operationId; - int counter = 0; - for (CodegenOperation op : opList) { - if (uniqueName.equals(op.operationId)) { - uniqueName = co.operationId + "_" + counter; - counter++; - } - } - if (!co.operationId.equals(uniqueName)) { - LOGGER.warn("generated unique operationId `{}`", uniqueName); - } - co.operationId = uniqueName; - co.operationIdCamelCase = camelize(uniqueName); - opList.add(co); - co.baseName = tag; - } - - @Override - public String defaultTemplatingEngine() { - return "handlebars"; - } - - @Override - public String generatorLanguageVersion() { return ">=3.7"; }; - - @Override - public void preprocessOpenAPI(OpenAPI openAPI) { - String originalSpecVersion; - String xOriginalSwaggerVersion = "x-original-swagger-version"; - if (openAPI.getExtensions() != null && !openAPI.getExtensions().isEmpty() && openAPI.getExtensions().containsKey(xOriginalSwaggerVersion)) { - originalSpecVersion = (String) openAPI.getExtensions().get(xOriginalSwaggerVersion); - } else { - originalSpecVersion = openAPI.getOpenapi(); - } - Integer specMajorVersion = Integer.parseInt(originalSpecVersion.substring(0, 1)); - if (specMajorVersion < 3) { - throw new RuntimeException("Your spec version of "+originalSpecVersion+" is too low. " + getName() + " only works with specs with version >= 3.X.X. Please use a tool like Swagger Editor or Swagger Converter to convert your spec to v3"); - } - } - - /** - * Note: a custom version of this function is used so the original tag value can be used - * - * @param tag Tag - * @return the tag to use - */ - @Override - public String sanitizeTag(String tag) { - return tag; - } - - public Map postProcessSupportingFileData(Map objs) { - objs.put(CodegenConstants.NON_COMPLIANT_USE_DISCR_IF_COMPOSITION_FAILS, nonCompliantUseDiscrIfCompositionFails); - return objs; - } - - @Override - public void postProcess() { - System.out.println("################################################################################"); - System.out.println("# Thanks for using OpenAPI Generator. #"); - System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #"); - System.out.println("# https://opencollective.com/openapi_generator/donate #"); - System.out.println("# #"); - System.out.println("# This generator was written by Justin Black (https://github.com/spacether) #"); - System.out.println("# Please support his work directly via https://github.com/sponsors/spacether \uD83D\uDE4F#"); - System.out.println("################################################################################"); - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 61c9d8a1d4d..6f10a85f26d 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -101,7 +101,6 @@ org.openapitools.codegen.languages.PhpDataTransferClientCodegen org.openapitools.codegen.languages.PowerShellClientCodegen org.openapitools.codegen.languages.ProtobufSchemaCodegen org.openapitools.codegen.languages.PythonNextgenClientCodegen -org.openapitools.codegen.languages.PythonClientCodegen org.openapitools.codegen.languages.PythonFastAPIServerCodegen org.openapitools.codegen.languages.PythonFlaskConnexionServerCodegen org.openapitools.codegen.languages.PythonAiohttpConnexionServerCodegen diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java index 71bc8275419..d15eedc4264 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultGeneratorTest.java @@ -708,7 +708,7 @@ public class DefaultGeneratorTest { StandardOpenOption.CREATE); final CodegenConfigurator configurator = new CodegenConfigurator() - .setGeneratorName("python") + .setGeneratorName("python-nextgen") .setInputSpec("src/test/resources/3_0/petstore.yaml") .setPackageName("io.something") .setTemplateDir(templates.toAbsolutePath().toString()) diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java deleted file mode 100644 index 8a4cbe73d31..00000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientTest.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.python; - -import com.google.common.io.Resources; -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.Operation; -import io.swagger.v3.oas.models.media.*; -import org.openapitools.codegen.*; -import org.openapitools.codegen.config.CodegenConfigurator; -import org.openapitools.codegen.languages.PythonClientCodegen; -import org.openapitools.codegen.model.ModelMap; -import org.openapitools.codegen.model.ModelsMap; -import org.openapitools.codegen.utils.ModelUtils; -import org.testng.Assert; -import org.testng.annotations.Test; - -import java.io.File; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -@SuppressWarnings("static-method") -public class PythonClientTest { - - @Test(description = "tests RecursiveExampleValueWithCycle") - public void testRecursiveExampleValueWithCycle() throws Exception { - - final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue_7532.yaml"); - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setOpenAPI(openAPI); - Schema schemaWithCycleInTreesProperty = openAPI.getComponents().getSchemas().get("Forest"); - String exampleValue = codegen.toExampleValue(schemaWithCycleInTreesProperty, null); - - String expectedValue = Resources.toString( - Resources.getResource("3_0/issue_7532_tree_example_value_expected.txt"), - StandardCharsets.UTF_8); - expectedValue = expectedValue.replaceAll("\\r\\n", "\n"); - Assert.assertEquals(exampleValue.trim(), expectedValue.trim()); - } - - @Test(expectedExceptions = RuntimeException.class) - public void testSpecWithTooLowVersionThrowsException() { - final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/2_0/petstore.yaml"); - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.preprocessOpenAPI(openAPI); - } - - @Test - public void testSpecWithAcceptableVersion() { - final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/petstore.yaml"); - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.preprocessOpenAPI(openAPI); - Assert.assertEquals(openAPI.getOpenapi() , "3.0.0"); - Assert.assertTrue(openAPI.getExtensions() == null); - } - - @Test - public void testSpecWithAcceptableVersionAndExtension() { - final OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/issue_12196.yaml"); - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.preprocessOpenAPI(openAPI); - Assert.assertEquals(openAPI.getOpenapi() , "3.0.0"); - Assert.assertFalse(openAPI.getExtensions().isEmpty()); - Assert.assertFalse(openAPI.getExtensions().containsValue("x-original-swagger-version")); - } - - @Test(description = "tests GeoJson Example for GeoJsonGeometry") - public void testRecursiveGeoJsonExampleWhenTypeIsGeoJsonGeometry() throws IOException { - - testEndpointExampleValue("/geojson", - "src/test/resources/3_0/issue_13043_recursive_model.yaml", - "3_0/issue_13043_recursive_model_expected_value.txt"); - - - } - - @Test(description = "tests GeoJson Example for GeometryCollection") - public void testRecursiveGeoJsonExampleWhenTypeIsGeometryCollection() throws IOException { - - testEndpointExampleValue("/geojson_geometry_collection", - "src/test/resources/3_0/issue_13043_recursive_model.yaml", - "3_0/issue_13043_geometry_collection_expected_value.txt"); - - } - - private void testEndpointExampleValue(String endpoint, String specFilePath, String expectedAnswerPath) throws IOException { - final OpenAPI openAPI = TestUtils.parseFlattenSpec(specFilePath); - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setOpenAPI(openAPI); - - final Operation operation = openAPI.getPaths().get(endpoint).getPost(); - Schema schema = ModelUtils.getSchemaFromRequestBody(operation.getRequestBody()); - String exampleValue = codegen.toExampleValue(schema, null); - - // uncomment if you need to regenerate the expected value - // PrintWriter printWriter = new PrintWriter("src/test/resources/" + expectedAnswerPath); - // printWriter.write(exampleValue); - // printWriter.close(); - // org.junit.Assert.assertTrue(false); - - String expectedValue = Resources.toString( - Resources.getResource(expectedAnswerPath), - StandardCharsets.UTF_8); - expectedValue = expectedValue.replaceAll("\\r\\n", "\n"); - Assert.assertEquals(exampleValue.trim(), expectedValue.trim()); - - } - - @Test - public void testApiTestsNotGenerated() throws Exception { - File output = Files.createTempDirectory("test").toFile(); - - Map globalProperties = Collections.singletonMap("apiTests", "false"); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGlobalProperties(globalProperties) - .setGeneratorName("python") - .setInputSpec("src/test/resources/3_0/petstore.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(clientOptInput).generate(); - Assert.assertTrue(files.size() > 0); - - Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/test/test_paths"); - Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist)); - output.deleteOnExit(); - } - - @Test - public void testApisNotGenerated() throws Exception { - File output = Files.createTempDirectory("test").toFile(); - - Map globalProperties = Collections.singletonMap("models", ""); - final CodegenConfigurator configurator = new CodegenConfigurator() - .setGlobalProperties(globalProperties) - .setGeneratorName("python") - .setInputSpec("src/test/resources/3_0/petstore.yaml") - .setOutputDir(output.getAbsolutePath().replace("\\", "/")); - - final ClientOptInput clientOptInput = configurator.toClientOptInput(); - DefaultGenerator generator = new DefaultGenerator(); - List files = generator.opts(clientOptInput).generate(); - Assert.assertTrue(files.size() > 0); - - Path pathThatShouldNotExist = output.toPath().resolve("openapi_client/paths"); - Assert.assertFalse(Files.isDirectory(pathThatShouldNotExist)); - output.deleteOnExit(); - } - - @Test - public void testRegexWithoutTrailingSlashWorks() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); - PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setOpenAPI(openAPI); - - String modelName = "UUID"; - Schema schema = openAPI.getComponents().getSchemas().get(modelName); - - CodegenModel cm = codegen.fromModel(modelName, schema); - String expectedRegexPattern = "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"; - Assert.assertEquals(cm.getPattern(), expectedRegexPattern); - Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern); - Assert.assertFalse(cm.vendorExtensions.containsKey("x-modifiers")); - } - - @Test - public void testRegexWithMultipleFlagsWorks() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/11_regex.yaml"); - PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setOpenAPI(openAPI); - - String modelName = "StringWithRegexWithThreeFlags"; - Schema schema = openAPI.getComponents().getSchemas().get(modelName); - - CodegenModel cm = codegen.fromModel(modelName, schema); - String expectedRegexPattern = "a."; - Assert.assertEquals(cm.getPattern(), expectedRegexPattern); - Assert.assertEquals(cm.vendorExtensions.get("x-regex"), expectedRegexPattern); - Assert.assertEquals(cm.vendorExtensions.get("x-modifiers"), Arrays.asList("DOTALL", "IGNORECASE", "MULTILINE")); - } - - @Test - public void testEnumNames() { - OpenAPI openAPI = TestUtils.parseFlattenSpec("src/test/resources/3_0/13942_schema_enum_names.yaml"); - PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setOpenAPI(openAPI); - - String modelName = "StringEnum"; - Schema schema = openAPI.getComponents().getSchemas().get(modelName); - - CodegenModel cm = codegen.fromModel(modelName, schema); - - ModelMap modelMap = new ModelMap(); - modelMap.setModel(cm); - - ModelsMap modelsMap = new ModelsMap(); - modelsMap.setModels(Collections.singletonList(modelMap)); - codegen.postProcessModels(modelsMap); - - ArrayList> enumVars = (ArrayList>) cm.getAllowableValues().get("enumVars"); - Assert.assertEquals(enumVars.size(), 2); - Assert.assertEquals(enumVars.get(0).get("name"), "DIGIT_THREE_67B9C"); - Assert.assertEquals(enumVars.get(1).get("name"), "FFA5A4"); - } - - @Test(description = "format imports of models using a package containing dots") - public void testImportWithQualifiedPackageName() throws Exception { - final PythonClientCodegen codegen = new PythonClientCodegen(); - codegen.setPackageName("openapi.client"); - - String importValue = codegen.toModelImport("model_name"); - Assert.assertEquals(importValue, "from openapi.client.model.model_name import ModelName"); - } - - @Test - public void testIdenticalSchemasHaveDifferentBasenames() { - final PythonClientCodegen codegen = new PythonClientCodegen(); - - Schema objSchema = new Schema(); - objSchema.setType("object"); - Schema addProp = new Schema(); - addProp.setType("object"); - objSchema.setAdditionalProperties(addProp); - - Schema arraySchema = new ArraySchema(); - Schema items = new Schema(); - items.setType("object"); - arraySchema.setItems(items); - - CodegenProperty objSchemaProp = codegen.fromProperty("objSchemaProp", objSchema, false, false); - CodegenProperty arraySchemaProp = codegen.fromProperty("arraySchemaProp", arraySchema, false, false); - Assert.assertEquals(objSchemaProp.getAdditionalProperties().baseName, "additional_properties"); - Assert.assertEquals(arraySchemaProp.getItems().baseName, "items"); - - CodegenModel objSchemaModel = codegen.fromModel("objSchemaModel", objSchema); - CodegenModel arraySchemaModel = codegen.fromModel("arraySchemaModel", arraySchema); - Assert.assertEquals(objSchemaModel.getAdditionalProperties().baseName, "additional_properties"); - Assert.assertEquals(arraySchemaModel.getItems().baseName, "items"); - } -} \ No newline at end of file diff --git a/pom.xml b/pom.xml index b99238115a0..52c3154d573 100644 --- a/pom.xml +++ b/pom.xml @@ -1249,8 +1249,6 @@ - - samples/openapi3/client/petstore/python diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.gitignore b/samples/openapi3/client/3_0_3_unit_test/python/.gitignore deleted file mode 100644 index a62e8aba43f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.gitignore +++ /dev/null @@ -1,67 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -dev-requirements.txt.log - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.gitlab-ci.yml b/samples/openapi3/client/3_0_3_unit_test/python/.gitlab-ci.yml deleted file mode 100644 index 22e33bfaa20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=unit_test_api - -test-3.5: - extends: .tests - image: python:3.5-alpine -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests - image: python:3.7-alpine -test-3.8: - extends: .tests - image: python:3.8-alpine diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator-ignore b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES deleted file mode 100644 index 76fb1cb914d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/FILES +++ /dev/null @@ -1,421 +0,0 @@ -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -docs/apis/tags/AdditionalPropertiesApi.md -docs/apis/tags/AllOfApi.md -docs/apis/tags/AnyOfApi.md -docs/apis/tags/ContentTypeJsonApi.md -docs/apis/tags/DefaultApi.md -docs/apis/tags/EnumApi.md -docs/apis/tags/FormatApi.md -docs/apis/tags/ItemsApi.md -docs/apis/tags/MaxItemsApi.md -docs/apis/tags/MaxLengthApi.md -docs/apis/tags/MaxPropertiesApi.md -docs/apis/tags/MaximumApi.md -docs/apis/tags/MinItemsApi.md -docs/apis/tags/MinLengthApi.md -docs/apis/tags/MinPropertiesApi.md -docs/apis/tags/MinimumApi.md -docs/apis/tags/ModelNotApi.md -docs/apis/tags/MultipleOfApi.md -docs/apis/tags/OneOfApi.md -docs/apis/tags/OperationRequestBodyApi.md -docs/apis/tags/PathPostApi.md -docs/apis/tags/PatternApi.md -docs/apis/tags/PropertiesApi.md -docs/apis/tags/RefApi.md -docs/apis/tags/RequiredApi.md -docs/apis/tags/ResponseContentContentTypeSchemaApi.md -docs/apis/tags/TypeApi.md -docs/apis/tags/UniqueItemsApi.md -docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md -docs/models/AdditionalpropertiesAreAllowedByDefault.md -docs/models/AdditionalpropertiesCanExistByItself.md -docs/models/AdditionalpropertiesShouldNotLookInApplicators.md -docs/models/Allof.md -docs/models/AllofCombinedWithAnyofOneof.md -docs/models/AllofSimpleTypes.md -docs/models/AllofWithBaseSchema.md -docs/models/AllofWithOneEmptySchema.md -docs/models/AllofWithTheFirstEmptySchema.md -docs/models/AllofWithTheLastEmptySchema.md -docs/models/AllofWithTwoEmptySchemas.md -docs/models/Anyof.md -docs/models/AnyofComplexTypes.md -docs/models/AnyofWithBaseSchema.md -docs/models/AnyofWithOneEmptySchema.md -docs/models/ArrayTypeMatchesArrays.md -docs/models/BooleanTypeMatchesBooleans.md -docs/models/ByInt.md -docs/models/ByNumber.md -docs/models/BySmallNumber.md -docs/models/DateTimeFormat.md -docs/models/EmailFormat.md -docs/models/EnumWith0DoesNotMatchFalse.md -docs/models/EnumWith1DoesNotMatchTrue.md -docs/models/EnumWithEscapedCharacters.md -docs/models/EnumWithFalseDoesNotMatch0.md -docs/models/EnumWithTrueDoesNotMatch1.md -docs/models/EnumsInProperties.md -docs/models/ForbiddenProperty.md -docs/models/HostnameFormat.md -docs/models/IntegerTypeMatchesIntegers.md -docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md -docs/models/InvalidStringValueForDefault.md -docs/models/Ipv4Format.md -docs/models/Ipv6Format.md -docs/models/JsonPointerFormat.md -docs/models/MaximumValidation.md -docs/models/MaximumValidationWithUnsignedInteger.md -docs/models/MaxitemsValidation.md -docs/models/MaxlengthValidation.md -docs/models/Maxproperties0MeansTheObjectIsEmpty.md -docs/models/MaxpropertiesValidation.md -docs/models/MinimumValidation.md -docs/models/MinimumValidationWithSignedInteger.md -docs/models/MinitemsValidation.md -docs/models/MinlengthValidation.md -docs/models/MinpropertiesValidation.md -docs/models/ModelNot.md -docs/models/NestedAllofToCheckValidationSemantics.md -docs/models/NestedAnyofToCheckValidationSemantics.md -docs/models/NestedItems.md -docs/models/NestedOneofToCheckValidationSemantics.md -docs/models/NotMoreComplexSchema.md -docs/models/NulCharactersInStrings.md -docs/models/NullTypeMatchesOnlyTheNullObject.md -docs/models/NumberTypeMatchesNumbers.md -docs/models/ObjectPropertiesValidation.md -docs/models/Oneof.md -docs/models/OneofComplexTypes.md -docs/models/OneofWithBaseSchema.md -docs/models/OneofWithEmptySchema.md -docs/models/OneofWithRequired.md -docs/models/PatternIsNotAnchored.md -docs/models/PatternValidation.md -docs/models/PropertiesWithEscapedCharacters.md -docs/models/PropertyNamedRefThatIsNotAReference.md -docs/models/RefInAdditionalproperties.md -docs/models/RefInAllof.md -docs/models/RefInAnyof.md -docs/models/RefInItems.md -docs/models/RefInNot.md -docs/models/RefInOneof.md -docs/models/RefInProperty.md -docs/models/RequiredDefaultValidation.md -docs/models/RequiredValidation.md -docs/models/RequiredWithEmptyArray.md -docs/models/RequiredWithEscapedCharacters.md -docs/models/SimpleEnumValidation.md -docs/models/StringTypeMatchesStrings.md -docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md -docs/models/UniqueitemsFalseValidation.md -docs/models/UniqueitemsValidation.md -docs/models/UriFormat.md -docs/models/UriReferenceFormat.md -docs/models/UriTemplateFormat.md -git_push.sh -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_models/__init__.py -test/test_models/test_additionalproperties_allows_a_schema_which_should_validate.py -test/test_models/test_additionalproperties_are_allowed_by_default.py -test/test_models/test_additionalproperties_can_exist_by_itself.py -test/test_models/test_additionalproperties_should_not_look_in_applicators.py -test/test_models/test_allof.py -test/test_models/test_allof_combined_with_anyof_oneof.py -test/test_models/test_allof_simple_types.py -test/test_models/test_allof_with_base_schema.py -test/test_models/test_allof_with_one_empty_schema.py -test/test_models/test_allof_with_the_first_empty_schema.py -test/test_models/test_allof_with_the_last_empty_schema.py -test/test_models/test_allof_with_two_empty_schemas.py -test/test_models/test_anyof.py -test/test_models/test_anyof_complex_types.py -test/test_models/test_anyof_with_base_schema.py -test/test_models/test_anyof_with_one_empty_schema.py -test/test_models/test_array_type_matches_arrays.py -test/test_models/test_boolean_type_matches_booleans.py -test/test_models/test_by_int.py -test/test_models/test_by_number.py -test/test_models/test_by_small_number.py -test/test_models/test_date_time_format.py -test/test_models/test_email_format.py -test/test_models/test_enum_with0_does_not_match_false.py -test/test_models/test_enum_with1_does_not_match_true.py -test/test_models/test_enum_with_escaped_characters.py -test/test_models/test_enum_with_false_does_not_match0.py -test/test_models/test_enum_with_true_does_not_match1.py -test/test_models/test_enums_in_properties.py -test/test_models/test_forbidden_property.py -test/test_models/test_hostname_format.py -test/test_models/test_integer_type_matches_integers.py -test/test_models/test_invalid_instance_should_not_raise_error_when_float_division_inf.py -test/test_models/test_invalid_string_value_for_default.py -test/test_models/test_ipv4_format.py -test/test_models/test_ipv6_format.py -test/test_models/test_json_pointer_format.py -test/test_models/test_maximum_validation.py -test/test_models/test_maximum_validation_with_unsigned_integer.py -test/test_models/test_maxitems_validation.py -test/test_models/test_maxlength_validation.py -test/test_models/test_maxproperties0_means_the_object_is_empty.py -test/test_models/test_maxproperties_validation.py -test/test_models/test_minimum_validation.py -test/test_models/test_minimum_validation_with_signed_integer.py -test/test_models/test_minitems_validation.py -test/test_models/test_minlength_validation.py -test/test_models/test_minproperties_validation.py -test/test_models/test_model_not.py -test/test_models/test_nested_allof_to_check_validation_semantics.py -test/test_models/test_nested_anyof_to_check_validation_semantics.py -test/test_models/test_nested_items.py -test/test_models/test_nested_oneof_to_check_validation_semantics.py -test/test_models/test_not_more_complex_schema.py -test/test_models/test_nul_characters_in_strings.py -test/test_models/test_null_type_matches_only_the_null_object.py -test/test_models/test_number_type_matches_numbers.py -test/test_models/test_object_properties_validation.py -test/test_models/test_oneof.py -test/test_models/test_oneof_complex_types.py -test/test_models/test_oneof_with_base_schema.py -test/test_models/test_oneof_with_empty_schema.py -test/test_models/test_oneof_with_required.py -test/test_models/test_pattern_is_not_anchored.py -test/test_models/test_pattern_validation.py -test/test_models/test_properties_with_escaped_characters.py -test/test_models/test_property_named_ref_that_is_not_a_reference.py -test/test_models/test_ref_in_additionalproperties.py -test/test_models/test_ref_in_allof.py -test/test_models/test_ref_in_anyof.py -test/test_models/test_ref_in_items.py -test/test_models/test_ref_in_not.py -test/test_models/test_ref_in_oneof.py -test/test_models/test_ref_in_property.py -test/test_models/test_required_default_validation.py -test/test_models/test_required_validation.py -test/test_models/test_required_with_empty_array.py -test/test_models/test_required_with_escaped_characters.py -test/test_models/test_simple_enum_validation.py -test/test_models/test_string_type_matches_strings.py -test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py -test/test_models/test_uniqueitems_false_validation.py -test/test_models/test_uniqueitems_validation.py -test/test_models/test_uri_format.py -test/test_models/test_uri_reference_format.py -test/test_models/test_uri_template_format.py -tox.ini -unit_test_api/__init__.py -unit_test_api/api_client.py -unit_test_api/apis/__init__.py -unit_test_api/apis/tags/additional_properties_api.py -unit_test_api/apis/tags/all_of_api.py -unit_test_api/apis/tags/any_of_api.py -unit_test_api/apis/tags/content_type_json_api.py -unit_test_api/apis/tags/default_api.py -unit_test_api/apis/tags/enum_api.py -unit_test_api/apis/tags/format_api.py -unit_test_api/apis/tags/items_api.py -unit_test_api/apis/tags/max_items_api.py -unit_test_api/apis/tags/max_length_api.py -unit_test_api/apis/tags/max_properties_api.py -unit_test_api/apis/tags/maximum_api.py -unit_test_api/apis/tags/min_items_api.py -unit_test_api/apis/tags/min_length_api.py -unit_test_api/apis/tags/min_properties_api.py -unit_test_api/apis/tags/minimum_api.py -unit_test_api/apis/tags/model_not_api.py -unit_test_api/apis/tags/multiple_of_api.py -unit_test_api/apis/tags/one_of_api.py -unit_test_api/apis/tags/operation_request_body_api.py -unit_test_api/apis/tags/path_post_api.py -unit_test_api/apis/tags/pattern_api.py -unit_test_api/apis/tags/properties_api.py -unit_test_api/apis/tags/ref_api.py -unit_test_api/apis/tags/required_api.py -unit_test_api/apis/tags/response_content_content_type_schema_api.py -unit_test_api/apis/tags/type_api.py -unit_test_api/apis/tags/unique_items_api.py -unit_test_api/configuration.py -unit_test_api/exceptions.py -unit_test_api/model/__init__.py -unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py -unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi -unit_test_api/model/additionalproperties_are_allowed_by_default.py -unit_test_api/model/additionalproperties_are_allowed_by_default.pyi -unit_test_api/model/additionalproperties_can_exist_by_itself.py -unit_test_api/model/additionalproperties_can_exist_by_itself.pyi -unit_test_api/model/additionalproperties_should_not_look_in_applicators.py -unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi -unit_test_api/model/allof.py -unit_test_api/model/allof.pyi -unit_test_api/model/allof_combined_with_anyof_oneof.py -unit_test_api/model/allof_combined_with_anyof_oneof.pyi -unit_test_api/model/allof_simple_types.py -unit_test_api/model/allof_simple_types.pyi -unit_test_api/model/allof_with_base_schema.py -unit_test_api/model/allof_with_base_schema.pyi -unit_test_api/model/allof_with_one_empty_schema.py -unit_test_api/model/allof_with_one_empty_schema.pyi -unit_test_api/model/allof_with_the_first_empty_schema.py -unit_test_api/model/allof_with_the_first_empty_schema.pyi -unit_test_api/model/allof_with_the_last_empty_schema.py -unit_test_api/model/allof_with_the_last_empty_schema.pyi -unit_test_api/model/allof_with_two_empty_schemas.py -unit_test_api/model/allof_with_two_empty_schemas.pyi -unit_test_api/model/anyof.py -unit_test_api/model/anyof.pyi -unit_test_api/model/anyof_complex_types.py -unit_test_api/model/anyof_complex_types.pyi -unit_test_api/model/anyof_with_base_schema.py -unit_test_api/model/anyof_with_base_schema.pyi -unit_test_api/model/anyof_with_one_empty_schema.py -unit_test_api/model/anyof_with_one_empty_schema.pyi -unit_test_api/model/array_type_matches_arrays.py -unit_test_api/model/array_type_matches_arrays.pyi -unit_test_api/model/boolean_type_matches_booleans.py -unit_test_api/model/boolean_type_matches_booleans.pyi -unit_test_api/model/by_int.py -unit_test_api/model/by_int.pyi -unit_test_api/model/by_number.py -unit_test_api/model/by_number.pyi -unit_test_api/model/by_small_number.py -unit_test_api/model/by_small_number.pyi -unit_test_api/model/date_time_format.py -unit_test_api/model/date_time_format.pyi -unit_test_api/model/email_format.py -unit_test_api/model/email_format.pyi -unit_test_api/model/enum_with0_does_not_match_false.py -unit_test_api/model/enum_with0_does_not_match_false.pyi -unit_test_api/model/enum_with1_does_not_match_true.py -unit_test_api/model/enum_with1_does_not_match_true.pyi -unit_test_api/model/enum_with_escaped_characters.py -unit_test_api/model/enum_with_escaped_characters.pyi -unit_test_api/model/enum_with_false_does_not_match0.py -unit_test_api/model/enum_with_false_does_not_match0.pyi -unit_test_api/model/enum_with_true_does_not_match1.py -unit_test_api/model/enum_with_true_does_not_match1.pyi -unit_test_api/model/enums_in_properties.py -unit_test_api/model/enums_in_properties.pyi -unit_test_api/model/forbidden_property.py -unit_test_api/model/forbidden_property.pyi -unit_test_api/model/hostname_format.py -unit_test_api/model/hostname_format.pyi -unit_test_api/model/integer_type_matches_integers.py -unit_test_api/model/integer_type_matches_integers.pyi -unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py -unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi -unit_test_api/model/invalid_string_value_for_default.py -unit_test_api/model/invalid_string_value_for_default.pyi -unit_test_api/model/ipv4_format.py -unit_test_api/model/ipv4_format.pyi -unit_test_api/model/ipv6_format.py -unit_test_api/model/ipv6_format.pyi -unit_test_api/model/json_pointer_format.py -unit_test_api/model/json_pointer_format.pyi -unit_test_api/model/maximum_validation.py -unit_test_api/model/maximum_validation.pyi -unit_test_api/model/maximum_validation_with_unsigned_integer.py -unit_test_api/model/maximum_validation_with_unsigned_integer.pyi -unit_test_api/model/maxitems_validation.py -unit_test_api/model/maxitems_validation.pyi -unit_test_api/model/maxlength_validation.py -unit_test_api/model/maxlength_validation.pyi -unit_test_api/model/maxproperties0_means_the_object_is_empty.py -unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi -unit_test_api/model/maxproperties_validation.py -unit_test_api/model/maxproperties_validation.pyi -unit_test_api/model/minimum_validation.py -unit_test_api/model/minimum_validation.pyi -unit_test_api/model/minimum_validation_with_signed_integer.py -unit_test_api/model/minimum_validation_with_signed_integer.pyi -unit_test_api/model/minitems_validation.py -unit_test_api/model/minitems_validation.pyi -unit_test_api/model/minlength_validation.py -unit_test_api/model/minlength_validation.pyi -unit_test_api/model/minproperties_validation.py -unit_test_api/model/minproperties_validation.pyi -unit_test_api/model/model_not.py -unit_test_api/model/model_not.pyi -unit_test_api/model/nested_allof_to_check_validation_semantics.py -unit_test_api/model/nested_allof_to_check_validation_semantics.pyi -unit_test_api/model/nested_anyof_to_check_validation_semantics.py -unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi -unit_test_api/model/nested_items.py -unit_test_api/model/nested_items.pyi -unit_test_api/model/nested_oneof_to_check_validation_semantics.py -unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi -unit_test_api/model/not_more_complex_schema.py -unit_test_api/model/not_more_complex_schema.pyi -unit_test_api/model/nul_characters_in_strings.py -unit_test_api/model/nul_characters_in_strings.pyi -unit_test_api/model/null_type_matches_only_the_null_object.py -unit_test_api/model/null_type_matches_only_the_null_object.pyi -unit_test_api/model/number_type_matches_numbers.py -unit_test_api/model/number_type_matches_numbers.pyi -unit_test_api/model/object_properties_validation.py -unit_test_api/model/object_properties_validation.pyi -unit_test_api/model/oneof.py -unit_test_api/model/oneof.pyi -unit_test_api/model/oneof_complex_types.py -unit_test_api/model/oneof_complex_types.pyi -unit_test_api/model/oneof_with_base_schema.py -unit_test_api/model/oneof_with_base_schema.pyi -unit_test_api/model/oneof_with_empty_schema.py -unit_test_api/model/oneof_with_empty_schema.pyi -unit_test_api/model/oneof_with_required.py -unit_test_api/model/oneof_with_required.pyi -unit_test_api/model/pattern_is_not_anchored.py -unit_test_api/model/pattern_is_not_anchored.pyi -unit_test_api/model/pattern_validation.py -unit_test_api/model/pattern_validation.pyi -unit_test_api/model/properties_with_escaped_characters.py -unit_test_api/model/properties_with_escaped_characters.pyi -unit_test_api/model/property_named_ref_that_is_not_a_reference.py -unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi -unit_test_api/model/ref_in_additionalproperties.py -unit_test_api/model/ref_in_additionalproperties.pyi -unit_test_api/model/ref_in_allof.py -unit_test_api/model/ref_in_allof.pyi -unit_test_api/model/ref_in_anyof.py -unit_test_api/model/ref_in_anyof.pyi -unit_test_api/model/ref_in_items.py -unit_test_api/model/ref_in_items.pyi -unit_test_api/model/ref_in_not.py -unit_test_api/model/ref_in_not.pyi -unit_test_api/model/ref_in_oneof.py -unit_test_api/model/ref_in_oneof.pyi -unit_test_api/model/ref_in_property.py -unit_test_api/model/ref_in_property.pyi -unit_test_api/model/required_default_validation.py -unit_test_api/model/required_default_validation.pyi -unit_test_api/model/required_validation.py -unit_test_api/model/required_validation.pyi -unit_test_api/model/required_with_empty_array.py -unit_test_api/model/required_with_empty_array.pyi -unit_test_api/model/required_with_escaped_characters.py -unit_test_api/model/required_with_escaped_characters.pyi -unit_test_api/model/simple_enum_validation.py -unit_test_api/model/simple_enum_validation.pyi -unit_test_api/model/string_type_matches_strings.py -unit_test_api/model/string_type_matches_strings.pyi -unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py -unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi -unit_test_api/model/uniqueitems_false_validation.py -unit_test_api/model/uniqueitems_false_validation.pyi -unit_test_api/model/uniqueitems_validation.py -unit_test_api/model/uniqueitems_validation.pyi -unit_test_api/model/uri_format.py -unit_test_api/model/uri_format.pyi -unit_test_api/model/uri_reference_format.py -unit_test_api/model/uri_reference_format.pyi -unit_test_api/model/uri_template_format.py -unit_test_api/model/uri_template_format.pyi -unit_test_api/models/__init__.py -unit_test_api/rest.py -unit_test_api/schemas.py diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION b/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION deleted file mode 100644 index 757e6740040..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/.travis.yml b/samples/openapi3/client/3_0_3_unit_test/python/.travis.yml deleted file mode 100644 index a0d79cf14a9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=unit_test_api diff --git a/samples/openapi3/client/3_0_3_unit_test/python/Makefile b/samples/openapi3/client/3_0_3_unit_test/python/Makefile deleted file mode 100644 index 863c380ebef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log -SETUP_OUT=*.egg-info -VENV=venv - -clean: - rm -rf $(REQUIREMENTS_OUT) - rm -rf $(SETUP_OUT) - rm -rf $(VENV) - rm -rf .tox - rm -rf .coverage - find . -name "*.py[oc]" -delete - find . -name "__pycache__" -delete - -test: clean - bash ./test_python.sh \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/README.md b/samples/openapi3/client/3_0_3_unit_test/python/README.md deleted file mode 100644 index 108b2923a97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/README.md +++ /dev/null @@ -1,1015 +0,0 @@ -# unit-test-api -sample spec for testing openapi functionality, built from json schema tests for draft6 - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 0.0.1 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python >=3.7 - -## Migration from other generators like python and python-legacy - -### Changes -1. This generator uses spec case for all (object) property names and parameter names. - - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case - - So you will need to update how you input and read properties to use spec case -2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below) - - So you will need to update how you pass data in to endpoints -3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers - - So you will need to update your code to use response.body to access deserialized data -4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO - - This means that you can use isinstance to check if a payload validated against a schema class - - This means that no data will be of type None/True/False - - ingested None will subclass NoneClass - - ingested True will subclass BoolClass - - ingested False will subclass BoolClass - - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg() -5. All validated class instances are immutable except for ones based on io.File - - This is because if properties were changed after validation, that validation would no longer apply - - So no changing values or property values after a class has been instantiated -6. String + Number types with formats - - String type data is stored as a string and if you need to access types based on its format like date, - date-time, uuid, number etc then you will need to use accessor functions on the instance - - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg - - type number + format: See .as_float_oapg, .as_int_oapg - - this was done because openapi/json-schema defines constraints. string data may be type string with no format - keyword in one schema, and include a format constraint in another schema - - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg - - So if you need to access a number format based type, use as_int_oapg/as_float_oapg -7. Property access on AnyType(type unset) or object(dict) schemas - - Only required keys with valid python names are properties like .someProp and have type hints - - All optional keys may not exist, so properties are not defined for them - - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist - - Use get_item_oapg if you need a way to always get a value whether or not the key exists - - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp') - - All required and optional keys have type hints for this method, and @typing.overload is used - - A type hint is also generated for additionalProperties accessed using this method - - So you will need to update you code to use some_instance['optionalProp'] to access optional property - and additionalProperty values -8. The location of the api classes has changed - - Api classes are located in your_package.apis.tags.some_api - - This change was made to eliminate redundant code generation - - Legacy generators generated the same endpoint twice if it had > 1 tag on it - - This generator defines an endpoint in one class, then inherits that class to generate - apis by tags and by paths - - This change reduces code and allows quicker run time if you use the path apis - - path apis are at your_package.apis.paths.some_path - - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api - - So you will need to update your import paths to the api classes - -### Why are Oapg and _oapg used in class and method names? -Classes can have arbitrarily named properties set on them -Endpoints can have arbitrary operationId method names set -For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions -on protected + public classes/methods. -oapg stands for OpenApi Python Generator. - -### Object property spec case -This was done because when payloads are ingested, they can be validated against N number of schemas. -If the input signature used a different property name then that has mutated the payload. -So SchemaA and SchemaB must both see the camelCase spec named variable. -Also it is possible to send in two properties, named camelCase and camel_case in the same payload. -That use case should be support so spec case is used. - -### Parameter spec case -Parameters can be included in different locations including: -- query -- path -- header -- cookie - -Any of those parameters could use the same parameter names, so if every parameter -was included as an endpoint parameter in a function signature, they would collide. -For that reason, each of those inputs have been separated out into separate typed dictionaries: -- query_params -- path_params -- header_params -- cookie_params - -So when updating your code, you will need to pass endpoint parameters in using those -dictionaries. - -### Endpoint responses -Endpoint responses have been enriched to now include more information. -Any response reom an endpoint will now include the following properties: -response: urllib3.HTTPResponse -body: typing.Union[Unset, Schema] -headers: typing.Union[Unset, TODO] -Note: response header deserialization has not yet been added - - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import unit_test_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import unit_test_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import unit_test_api -from pprint import pprint -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api.model.ref_in_allof import RefInAllof -from unit_test_api.model.ref_in_anyof import RefInAnyof -from unit_test_api.model.ref_in_items import RefInItems -from unit_test_api.model.ref_in_oneof import RefInOneof -from unit_test_api.model.ref_in_property import RefInProperty -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - property_named_ref_that_is_not_a_reference = PropertyNamedRefThatIsNotAReference(None) # PropertyNamedRefThatIsNotAReference | - - try: - api_instance.post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://someserver.com/v1* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*RefApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/apis/tags/RefApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*RefApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_additionalproperties_request_body**](docs/apis/tags/RefApi.md#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -*RefApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_allof_request_body**](docs/apis/tags/RefApi.md#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -*RefApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_anyof_request_body**](docs/apis/tags/RefApi.md#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -*RefApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_items_request_body**](docs/apis/tags/RefApi.md#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -*RefApi* | [**post_ref_in_items_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_not_request_body**](docs/apis/tags/RefApi.md#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -*RefApi* | [**post_ref_in_not_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_oneof_request_body**](docs/apis/tags/RefApi.md#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -*RefApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -*RefApi* | [**post_ref_in_property_request_body**](docs/apis/tags/RefApi.md#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -*RefApi* | [**post_ref_in_property_response_body_for_content_types**](docs/apis/tags/RefApi.md#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -*AdditionalPropertiesApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*AdditionalPropertiesApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -*AdditionalPropertiesApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*AdditionalPropertiesApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -*AdditionalPropertiesApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*AdditionalPropertiesApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -*AdditionalPropertiesApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*AdditionalPropertiesApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/apis/tags/AdditionalPropertiesApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/apis/tags/AllOfApi.md#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*AllOfApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_request_body**](docs/apis/tags/AllOfApi.md#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -*AllOfApi* | [**post_allof_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_simple_types_request_body**](docs/apis/tags/AllOfApi.md#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -*AllOfApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_with_base_schema_request_body**](docs/apis/tags/AllOfApi.md#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -*AllOfApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_with_one_empty_schema_request_body**](docs/apis/tags/AllOfApi.md#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*AllOfApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/apis/tags/AllOfApi.md#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*AllOfApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/apis/tags/AllOfApi.md#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*AllOfApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -*AllOfApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/apis/tags/AllOfApi.md#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*AllOfApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -*AllOfApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/apis/tags/AllOfApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*AllOfApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/AllOfApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -*AnyOfApi* | [**post_anyof_complex_types_request_body**](docs/apis/tags/AnyOfApi.md#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -*AnyOfApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/apis/tags/AnyOfApi.md#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -*AnyOfApi* | [**post_anyof_request_body**](docs/apis/tags/AnyOfApi.md#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -*AnyOfApi* | [**post_anyof_response_body_for_content_types**](docs/apis/tags/AnyOfApi.md#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -*AnyOfApi* | [**post_anyof_with_base_schema_request_body**](docs/apis/tags/AnyOfApi.md#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -*AnyOfApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/apis/tags/AnyOfApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -*AnyOfApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/apis/tags/AnyOfApi.md#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*AnyOfApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/AnyOfApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -*AnyOfApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/apis/tags/AnyOfApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*AnyOfApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/AnyOfApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*ContentTypeJsonApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*ContentTypeJsonApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*ContentTypeJsonApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*ContentTypeJsonApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*ContentTypeJsonApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -*ContentTypeJsonApi* | [**post_allof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_simple_types_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -*ContentTypeJsonApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_with_base_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -*ContentTypeJsonApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_with_one_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*ContentTypeJsonApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*ContentTypeJsonApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*ContentTypeJsonApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*ContentTypeJsonApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_anyof_complex_types_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -*ContentTypeJsonApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_anyof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -*ContentTypeJsonApi* | [**post_anyof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_anyof_with_base_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -*ContentTypeJsonApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*ContentTypeJsonApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_array_type_matches_arrays_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -*ContentTypeJsonApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_boolean_type_matches_booleans_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*ContentTypeJsonApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_by_int_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -*ContentTypeJsonApi* | [**post_by_int_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_by_number_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -*ContentTypeJsonApi* | [**post_by_number_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_by_small_number_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -*ContentTypeJsonApi* | [**post_by_small_number_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_date_time_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -*ContentTypeJsonApi* | [**post_date_time_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_email_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -*ContentTypeJsonApi* | [**post_email_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*ContentTypeJsonApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*ContentTypeJsonApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enum_with_escaped_characters_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -*ContentTypeJsonApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*ContentTypeJsonApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*ContentTypeJsonApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_enums_in_properties_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -*ContentTypeJsonApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_forbidden_property_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -*ContentTypeJsonApi* | [**post_forbidden_property_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_hostname_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -*ContentTypeJsonApi* | [**post_hostname_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_integer_type_matches_integers_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*ContentTypeJsonApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*ContentTypeJsonApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_invalid_string_value_for_default_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -*ContentTypeJsonApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ipv4_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -*ContentTypeJsonApi* | [**post_ipv4_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ipv6_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -*ContentTypeJsonApi* | [**post_ipv6_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_json_pointer_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -*ContentTypeJsonApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maximum_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -*ContentTypeJsonApi* | [**post_maximum_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*ContentTypeJsonApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maxitems_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -*ContentTypeJsonApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maxlength_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -*ContentTypeJsonApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*ContentTypeJsonApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_maxproperties_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -*ContentTypeJsonApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_minimum_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -*ContentTypeJsonApi* | [**post_minimum_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*ContentTypeJsonApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_minitems_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -*ContentTypeJsonApi* | [**post_minitems_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_minlength_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -*ContentTypeJsonApi* | [**post_minlength_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_minproperties_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -*ContentTypeJsonApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*ContentTypeJsonApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*ContentTypeJsonApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_nested_items_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -*ContentTypeJsonApi* | [**post_nested_items_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*ContentTypeJsonApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_not_more_complex_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -*ContentTypeJsonApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_not_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_not_request_body) | **post** /requestBody/postNotRequestBody | -*ContentTypeJsonApi* | [**post_not_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_nul_characters_in_strings_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -*ContentTypeJsonApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*ContentTypeJsonApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_number_type_matches_numbers_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*ContentTypeJsonApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_object_properties_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -*ContentTypeJsonApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_object_type_matches_objects_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*ContentTypeJsonApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_oneof_complex_types_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -*ContentTypeJsonApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_oneof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -*ContentTypeJsonApi* | [**post_oneof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_oneof_with_base_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -*ContentTypeJsonApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -*ContentTypeJsonApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -*ContentTypeJsonApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -*ContentTypeJsonApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_pattern_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -*ContentTypeJsonApi* | [**post_pattern_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_properties_with_escaped_characters_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*ContentTypeJsonApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*ContentTypeJsonApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_additionalproperties_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_allof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_anyof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_items_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_items_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_not_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_not_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_oneof_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_ref_in_property_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -*ContentTypeJsonApi* | [**post_ref_in_property_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_required_default_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -*ContentTypeJsonApi* | [**post_required_default_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_required_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -*ContentTypeJsonApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -*ContentTypeJsonApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -*ContentTypeJsonApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -*ContentTypeJsonApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -*ContentTypeJsonApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*ContentTypeJsonApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_uniqueitems_false_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -*ContentTypeJsonApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_uniqueitems_validation_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -*ContentTypeJsonApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_uri_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -*ContentTypeJsonApi* | [**post_uri_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_uri_reference_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -*ContentTypeJsonApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -*ContentTypeJsonApi* | [**post_uri_template_format_request_body**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -*ContentTypeJsonApi* | [**post_uri_template_format_response_body_for_content_types**](docs/apis/tags/ContentTypeJsonApi.md#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | -*DefaultApi* | [**post_invalid_string_value_for_default_request_body**](docs/apis/tags/DefaultApi.md#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -*DefaultApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/apis/tags/DefaultApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -*DefaultApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/apis/tags/DefaultApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*DefaultApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/apis/tags/DefaultApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -*EnumApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/apis/tags/EnumApi.md#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*EnumApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -*EnumApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/apis/tags/EnumApi.md#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*EnumApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -*EnumApi* | [**post_enum_with_escaped_characters_request_body**](docs/apis/tags/EnumApi.md#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -*EnumApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -*EnumApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/apis/tags/EnumApi.md#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*EnumApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -*EnumApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/apis/tags/EnumApi.md#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*EnumApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -*EnumApi* | [**post_enums_in_properties_request_body**](docs/apis/tags/EnumApi.md#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -*EnumApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -*EnumApi* | [**post_nul_characters_in_strings_request_body**](docs/apis/tags/EnumApi.md#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -*EnumApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -*EnumApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/EnumApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -*EnumApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/EnumApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -*FormatApi* | [**post_date_time_format_request_body**](docs/apis/tags/FormatApi.md#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -*FormatApi* | [**post_date_time_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -*FormatApi* | [**post_email_format_request_body**](docs/apis/tags/FormatApi.md#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -*FormatApi* | [**post_email_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -*FormatApi* | [**post_hostname_format_request_body**](docs/apis/tags/FormatApi.md#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -*FormatApi* | [**post_hostname_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -*FormatApi* | [**post_ipv4_format_request_body**](docs/apis/tags/FormatApi.md#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -*FormatApi* | [**post_ipv4_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -*FormatApi* | [**post_ipv6_format_request_body**](docs/apis/tags/FormatApi.md#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -*FormatApi* | [**post_ipv6_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -*FormatApi* | [**post_json_pointer_format_request_body**](docs/apis/tags/FormatApi.md#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -*FormatApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -*FormatApi* | [**post_uri_format_request_body**](docs/apis/tags/FormatApi.md#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -*FormatApi* | [**post_uri_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -*FormatApi* | [**post_uri_reference_format_request_body**](docs/apis/tags/FormatApi.md#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -*FormatApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -*FormatApi* | [**post_uri_template_format_request_body**](docs/apis/tags/FormatApi.md#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -*FormatApi* | [**post_uri_template_format_response_body_for_content_types**](docs/apis/tags/FormatApi.md#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | -*ItemsApi* | [**post_nested_items_request_body**](docs/apis/tags/ItemsApi.md#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -*ItemsApi* | [**post_nested_items_response_body_for_content_types**](docs/apis/tags/ItemsApi.md#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -*MaxItemsApi* | [**post_maxitems_validation_request_body**](docs/apis/tags/MaxItemsApi.md#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -*MaxItemsApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/apis/tags/MaxItemsApi.md#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -*MaxLengthApi* | [**post_maxlength_validation_request_body**](docs/apis/tags/MaxLengthApi.md#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -*MaxLengthApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/apis/tags/MaxLengthApi.md#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -*MaxPropertiesApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/apis/tags/MaxPropertiesApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*MaxPropertiesApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/apis/tags/MaxPropertiesApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -*MaxPropertiesApi* | [**post_maxproperties_validation_request_body**](docs/apis/tags/MaxPropertiesApi.md#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -*MaxPropertiesApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/apis/tags/MaxPropertiesApi.md#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -*MaximumApi* | [**post_maximum_validation_request_body**](docs/apis/tags/MaximumApi.md#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -*MaximumApi* | [**post_maximum_validation_response_body_for_content_types**](docs/apis/tags/MaximumApi.md#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -*MaximumApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/apis/tags/MaximumApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*MaximumApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/apis/tags/MaximumApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -*MinItemsApi* | [**post_minitems_validation_request_body**](docs/apis/tags/MinItemsApi.md#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -*MinItemsApi* | [**post_minitems_validation_response_body_for_content_types**](docs/apis/tags/MinItemsApi.md#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -*MinLengthApi* | [**post_minlength_validation_request_body**](docs/apis/tags/MinLengthApi.md#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -*MinLengthApi* | [**post_minlength_validation_response_body_for_content_types**](docs/apis/tags/MinLengthApi.md#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -*MinPropertiesApi* | [**post_minproperties_validation_request_body**](docs/apis/tags/MinPropertiesApi.md#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -*MinPropertiesApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/apis/tags/MinPropertiesApi.md#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -*MinimumApi* | [**post_minimum_validation_request_body**](docs/apis/tags/MinimumApi.md#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -*MinimumApi* | [**post_minimum_validation_response_body_for_content_types**](docs/apis/tags/MinimumApi.md#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -*MinimumApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/apis/tags/MinimumApi.md#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*MinimumApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/apis/tags/MinimumApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -*MultipleOfApi* | [**post_by_int_request_body**](docs/apis/tags/MultipleOfApi.md#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -*MultipleOfApi* | [**post_by_int_response_body_for_content_types**](docs/apis/tags/MultipleOfApi.md#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -*MultipleOfApi* | [**post_by_number_request_body**](docs/apis/tags/MultipleOfApi.md#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -*MultipleOfApi* | [**post_by_number_response_body_for_content_types**](docs/apis/tags/MultipleOfApi.md#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -*MultipleOfApi* | [**post_by_small_number_request_body**](docs/apis/tags/MultipleOfApi.md#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -*MultipleOfApi* | [**post_by_small_number_response_body_for_content_types**](docs/apis/tags/MultipleOfApi.md#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -*MultipleOfApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/apis/tags/MultipleOfApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*MultipleOfApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/apis/tags/MultipleOfApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -*ModelNotApi* | [**post_forbidden_property_request_body**](docs/apis/tags/ModelNotApi.md#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -*ModelNotApi* | [**post_forbidden_property_response_body_for_content_types**](docs/apis/tags/ModelNotApi.md#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -*ModelNotApi* | [**post_not_more_complex_schema_request_body**](docs/apis/tags/ModelNotApi.md#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -*ModelNotApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/apis/tags/ModelNotApi.md#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -*ModelNotApi* | [**post_not_request_body**](docs/apis/tags/ModelNotApi.md#post_not_request_body) | **post** /requestBody/postNotRequestBody | -*ModelNotApi* | [**post_not_response_body_for_content_types**](docs/apis/tags/ModelNotApi.md#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -*OneOfApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/apis/tags/OneOfApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*OneOfApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -*OneOfApi* | [**post_oneof_complex_types_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -*OneOfApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -*OneOfApi* | [**post_oneof_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -*OneOfApi* | [**post_oneof_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -*OneOfApi* | [**post_oneof_with_base_schema_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -*OneOfApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -*OneOfApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -*OneOfApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -*OneOfApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/OneOfApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -*OneOfApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/OneOfApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -*OperationRequestBodyApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*OperationRequestBodyApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*OperationRequestBodyApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*OperationRequestBodyApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*OperationRequestBodyApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*OperationRequestBodyApi* | [**post_allof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -*OperationRequestBodyApi* | [**post_allof_simple_types_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -*OperationRequestBodyApi* | [**post_allof_with_base_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -*OperationRequestBodyApi* | [**post_allof_with_one_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*OperationRequestBodyApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*OperationRequestBodyApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*OperationRequestBodyApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*OperationRequestBodyApi* | [**post_anyof_complex_types_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -*OperationRequestBodyApi* | [**post_anyof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -*OperationRequestBodyApi* | [**post_anyof_with_base_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -*OperationRequestBodyApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*OperationRequestBodyApi* | [**post_array_type_matches_arrays_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -*OperationRequestBodyApi* | [**post_boolean_type_matches_booleans_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*OperationRequestBodyApi* | [**post_by_int_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -*OperationRequestBodyApi* | [**post_by_number_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -*OperationRequestBodyApi* | [**post_by_small_number_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -*OperationRequestBodyApi* | [**post_date_time_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -*OperationRequestBodyApi* | [**post_email_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -*OperationRequestBodyApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*OperationRequestBodyApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*OperationRequestBodyApi* | [**post_enum_with_escaped_characters_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -*OperationRequestBodyApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*OperationRequestBodyApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*OperationRequestBodyApi* | [**post_enums_in_properties_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -*OperationRequestBodyApi* | [**post_forbidden_property_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -*OperationRequestBodyApi* | [**post_hostname_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -*OperationRequestBodyApi* | [**post_integer_type_matches_integers_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*OperationRequestBodyApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*OperationRequestBodyApi* | [**post_invalid_string_value_for_default_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -*OperationRequestBodyApi* | [**post_ipv4_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -*OperationRequestBodyApi* | [**post_ipv6_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -*OperationRequestBodyApi* | [**post_json_pointer_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -*OperationRequestBodyApi* | [**post_maximum_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -*OperationRequestBodyApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*OperationRequestBodyApi* | [**post_maxitems_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -*OperationRequestBodyApi* | [**post_maxlength_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -*OperationRequestBodyApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*OperationRequestBodyApi* | [**post_maxproperties_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -*OperationRequestBodyApi* | [**post_minimum_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -*OperationRequestBodyApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*OperationRequestBodyApi* | [**post_minitems_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -*OperationRequestBodyApi* | [**post_minlength_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -*OperationRequestBodyApi* | [**post_minproperties_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -*OperationRequestBodyApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*OperationRequestBodyApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*OperationRequestBodyApi* | [**post_nested_items_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -*OperationRequestBodyApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*OperationRequestBodyApi* | [**post_not_more_complex_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -*OperationRequestBodyApi* | [**post_not_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_not_request_body) | **post** /requestBody/postNotRequestBody | -*OperationRequestBodyApi* | [**post_nul_characters_in_strings_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -*OperationRequestBodyApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*OperationRequestBodyApi* | [**post_number_type_matches_numbers_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*OperationRequestBodyApi* | [**post_object_properties_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -*OperationRequestBodyApi* | [**post_object_type_matches_objects_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*OperationRequestBodyApi* | [**post_oneof_complex_types_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -*OperationRequestBodyApi* | [**post_oneof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -*OperationRequestBodyApi* | [**post_oneof_with_base_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -*OperationRequestBodyApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -*OperationRequestBodyApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -*OperationRequestBodyApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -*OperationRequestBodyApi* | [**post_pattern_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -*OperationRequestBodyApi* | [**post_properties_with_escaped_characters_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*OperationRequestBodyApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_additionalproperties_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_allof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_anyof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_items_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_not_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_oneof_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -*OperationRequestBodyApi* | [**post_ref_in_property_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -*OperationRequestBodyApi* | [**post_required_default_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -*OperationRequestBodyApi* | [**post_required_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -*OperationRequestBodyApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -*OperationRequestBodyApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -*OperationRequestBodyApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -*OperationRequestBodyApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -*OperationRequestBodyApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*OperationRequestBodyApi* | [**post_uniqueitems_false_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -*OperationRequestBodyApi* | [**post_uniqueitems_validation_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -*OperationRequestBodyApi* | [**post_uri_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -*OperationRequestBodyApi* | [**post_uri_reference_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -*OperationRequestBodyApi* | [**post_uri_template_format_request_body**](docs/apis/tags/OperationRequestBodyApi.md#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -*PathPostApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](docs/apis/tags/PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -*PathPostApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -*PathPostApi* | [**post_additionalproperties_are_allowed_by_default_request_body**](docs/apis/tags/PathPostApi.md#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -*PathPostApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -*PathPostApi* | [**post_additionalproperties_can_exist_by_itself_request_body**](docs/apis/tags/PathPostApi.md#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -*PathPostApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -*PathPostApi* | [**post_additionalproperties_should_not_look_in_applicators_request_body**](docs/apis/tags/PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -*PathPostApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_combined_with_anyof_oneof_request_body**](docs/apis/tags/PathPostApi.md#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -*PathPostApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_request_body**](docs/apis/tags/PathPostApi.md#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -*PathPostApi* | [**post_allof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_simple_types_request_body**](docs/apis/tags/PathPostApi.md#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -*PathPostApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_with_base_schema_request_body**](docs/apis/tags/PathPostApi.md#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -*PathPostApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_with_one_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -*PathPostApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_with_the_first_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -*PathPostApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_with_the_last_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -*PathPostApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_allof_with_two_empty_schemas_request_body**](docs/apis/tags/PathPostApi.md#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -*PathPostApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -*PathPostApi* | [**post_anyof_complex_types_request_body**](docs/apis/tags/PathPostApi.md#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -*PathPostApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -*PathPostApi* | [**post_anyof_request_body**](docs/apis/tags/PathPostApi.md#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -*PathPostApi* | [**post_anyof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -*PathPostApi* | [**post_anyof_with_base_schema_request_body**](docs/apis/tags/PathPostApi.md#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -*PathPostApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_anyof_with_one_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -*PathPostApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_array_type_matches_arrays_request_body**](docs/apis/tags/PathPostApi.md#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -*PathPostApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -*PathPostApi* | [**post_boolean_type_matches_booleans_request_body**](docs/apis/tags/PathPostApi.md#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*PathPostApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -*PathPostApi* | [**post_by_int_request_body**](docs/apis/tags/PathPostApi.md#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -*PathPostApi* | [**post_by_int_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -*PathPostApi* | [**post_by_number_request_body**](docs/apis/tags/PathPostApi.md#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -*PathPostApi* | [**post_by_number_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -*PathPostApi* | [**post_by_small_number_request_body**](docs/apis/tags/PathPostApi.md#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -*PathPostApi* | [**post_by_small_number_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -*PathPostApi* | [**post_date_time_format_request_body**](docs/apis/tags/PathPostApi.md#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -*PathPostApi* | [**post_date_time_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_email_format_request_body**](docs/apis/tags/PathPostApi.md#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -*PathPostApi* | [**post_email_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_enum_with0_does_not_match_false_request_body**](docs/apis/tags/PathPostApi.md#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -*PathPostApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -*PathPostApi* | [**post_enum_with1_does_not_match_true_request_body**](docs/apis/tags/PathPostApi.md#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -*PathPostApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -*PathPostApi* | [**post_enum_with_escaped_characters_request_body**](docs/apis/tags/PathPostApi.md#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -*PathPostApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -*PathPostApi* | [**post_enum_with_false_does_not_match0_request_body**](docs/apis/tags/PathPostApi.md#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -*PathPostApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -*PathPostApi* | [**post_enum_with_true_does_not_match1_request_body**](docs/apis/tags/PathPostApi.md#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -*PathPostApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -*PathPostApi* | [**post_enums_in_properties_request_body**](docs/apis/tags/PathPostApi.md#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -*PathPostApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -*PathPostApi* | [**post_forbidden_property_request_body**](docs/apis/tags/PathPostApi.md#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -*PathPostApi* | [**post_forbidden_property_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -*PathPostApi* | [**post_hostname_format_request_body**](docs/apis/tags/PathPostApi.md#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -*PathPostApi* | [**post_hostname_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_integer_type_matches_integers_request_body**](docs/apis/tags/PathPostApi.md#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*PathPostApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -*PathPostApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](docs/apis/tags/PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -*PathPostApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -*PathPostApi* | [**post_invalid_string_value_for_default_request_body**](docs/apis/tags/PathPostApi.md#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -*PathPostApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -*PathPostApi* | [**post_ipv4_format_request_body**](docs/apis/tags/PathPostApi.md#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -*PathPostApi* | [**post_ipv4_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -*PathPostApi* | [**post_ipv6_format_request_body**](docs/apis/tags/PathPostApi.md#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -*PathPostApi* | [**post_ipv6_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -*PathPostApi* | [**post_json_pointer_format_request_body**](docs/apis/tags/PathPostApi.md#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -*PathPostApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_maximum_validation_request_body**](docs/apis/tags/PathPostApi.md#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -*PathPostApi* | [**post_maximum_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_maximum_validation_with_unsigned_integer_request_body**](docs/apis/tags/PathPostApi.md#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -*PathPostApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -*PathPostApi* | [**post_maxitems_validation_request_body**](docs/apis/tags/PathPostApi.md#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -*PathPostApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_maxlength_validation_request_body**](docs/apis/tags/PathPostApi.md#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -*PathPostApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_maxproperties0_means_the_object_is_empty_request_body**](docs/apis/tags/PathPostApi.md#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -*PathPostApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -*PathPostApi* | [**post_maxproperties_validation_request_body**](docs/apis/tags/PathPostApi.md#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -*PathPostApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_minimum_validation_request_body**](docs/apis/tags/PathPostApi.md#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -*PathPostApi* | [**post_minimum_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_minimum_validation_with_signed_integer_request_body**](docs/apis/tags/PathPostApi.md#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -*PathPostApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -*PathPostApi* | [**post_minitems_validation_request_body**](docs/apis/tags/PathPostApi.md#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -*PathPostApi* | [**post_minitems_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_minlength_validation_request_body**](docs/apis/tags/PathPostApi.md#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -*PathPostApi* | [**post_minlength_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_minproperties_validation_request_body**](docs/apis/tags/PathPostApi.md#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -*PathPostApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_nested_allof_to_check_validation_semantics_request_body**](docs/apis/tags/PathPostApi.md#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -*PathPostApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -*PathPostApi* | [**post_nested_anyof_to_check_validation_semantics_request_body**](docs/apis/tags/PathPostApi.md#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -*PathPostApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -*PathPostApi* | [**post_nested_items_request_body**](docs/apis/tags/PathPostApi.md#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -*PathPostApi* | [**post_nested_items_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -*PathPostApi* | [**post_nested_oneof_to_check_validation_semantics_request_body**](docs/apis/tags/PathPostApi.md#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -*PathPostApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -*PathPostApi* | [**post_not_more_complex_schema_request_body**](docs/apis/tags/PathPostApi.md#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -*PathPostApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_not_request_body**](docs/apis/tags/PathPostApi.md#post_not_request_body) | **post** /requestBody/postNotRequestBody | -*PathPostApi* | [**post_not_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -*PathPostApi* | [**post_nul_characters_in_strings_request_body**](docs/apis/tags/PathPostApi.md#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -*PathPostApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -*PathPostApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/apis/tags/PathPostApi.md#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*PathPostApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -*PathPostApi* | [**post_number_type_matches_numbers_request_body**](docs/apis/tags/PathPostApi.md#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*PathPostApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -*PathPostApi* | [**post_object_properties_validation_request_body**](docs/apis/tags/PathPostApi.md#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -*PathPostApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_object_type_matches_objects_request_body**](docs/apis/tags/PathPostApi.md#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*PathPostApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -*PathPostApi* | [**post_oneof_complex_types_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -*PathPostApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -*PathPostApi* | [**post_oneof_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -*PathPostApi* | [**post_oneof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -*PathPostApi* | [**post_oneof_with_base_schema_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -*PathPostApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_oneof_with_empty_schema_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -*PathPostApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -*PathPostApi* | [**post_oneof_with_required_request_body**](docs/apis/tags/PathPostApi.md#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -*PathPostApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -*PathPostApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/PathPostApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -*PathPostApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -*PathPostApi* | [**post_pattern_validation_request_body**](docs/apis/tags/PathPostApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -*PathPostApi* | [**post_pattern_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_properties_with_escaped_characters_request_body**](docs/apis/tags/PathPostApi.md#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*PathPostApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -*PathPostApi* | [**post_property_named_ref_that_is_not_a_reference_request_body**](docs/apis/tags/PathPostApi.md#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -*PathPostApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_additionalproperties_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -*PathPostApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_allof_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -*PathPostApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_anyof_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -*PathPostApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_items_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -*PathPostApi* | [**post_ref_in_items_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_not_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -*PathPostApi* | [**post_ref_in_not_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_oneof_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -*PathPostApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -*PathPostApi* | [**post_ref_in_property_request_body**](docs/apis/tags/PathPostApi.md#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -*PathPostApi* | [**post_ref_in_property_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -*PathPostApi* | [**post_required_default_validation_request_body**](docs/apis/tags/PathPostApi.md#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -*PathPostApi* | [**post_required_default_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_required_validation_request_body**](docs/apis/tags/PathPostApi.md#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -*PathPostApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/PathPostApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -*PathPostApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -*PathPostApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/PathPostApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -*PathPostApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -*PathPostApi* | [**post_simple_enum_validation_request_body**](docs/apis/tags/PathPostApi.md#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -*PathPostApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/PathPostApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -*PathPostApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -*PathPostApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](docs/apis/tags/PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -*PathPostApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -*PathPostApi* | [**post_uniqueitems_false_validation_request_body**](docs/apis/tags/PathPostApi.md#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -*PathPostApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_uniqueitems_validation_request_body**](docs/apis/tags/PathPostApi.md#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -*PathPostApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -*PathPostApi* | [**post_uri_format_request_body**](docs/apis/tags/PathPostApi.md#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -*PathPostApi* | [**post_uri_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_uri_reference_format_request_body**](docs/apis/tags/PathPostApi.md#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -*PathPostApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -*PathPostApi* | [**post_uri_template_format_request_body**](docs/apis/tags/PathPostApi.md#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -*PathPostApi* | [**post_uri_template_format_response_body_for_content_types**](docs/apis/tags/PathPostApi.md#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | -*PatternApi* | [**post_pattern_is_not_anchored_request_body**](docs/apis/tags/PatternApi.md#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -*PatternApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/PatternApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -*PatternApi* | [**post_pattern_validation_request_body**](docs/apis/tags/PatternApi.md#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -*PatternApi* | [**post_pattern_validation_response_body_for_content_types**](docs/apis/tags/PatternApi.md#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -*PropertiesApi* | [**post_object_properties_validation_request_body**](docs/apis/tags/PropertiesApi.md#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -*PropertiesApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/apis/tags/PropertiesApi.md#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -*PropertiesApi* | [**post_properties_with_escaped_characters_request_body**](docs/apis/tags/PropertiesApi.md#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -*PropertiesApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/PropertiesApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -*RequiredApi* | [**post_required_default_validation_request_body**](docs/apis/tags/RequiredApi.md#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -*RequiredApi* | [**post_required_default_validation_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -*RequiredApi* | [**post_required_validation_request_body**](docs/apis/tags/RequiredApi.md#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -*RequiredApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -*RequiredApi* | [**post_required_with_empty_array_request_body**](docs/apis/tags/RequiredApi.md#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -*RequiredApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -*RequiredApi* | [**post_required_with_escaped_characters_request_body**](docs/apis/tags/RequiredApi.md#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -*RequiredApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/RequiredApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_simple_types_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_with_the_first_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_with_the_last_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_allof_with_two_empty_schemas_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_anyof_complex_types_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_anyof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_anyof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_anyof_with_one_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_by_int_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_by_number_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_by_small_number_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_date_time_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_email_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enum_with0_does_not_match_false_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enum_with1_does_not_match_true_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enum_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enum_with_false_does_not_match0_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enum_with_true_does_not_match1_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_enums_in_properties_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_forbidden_property_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_hostname_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_invalid_string_value_for_default_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ipv4_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ipv6_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_json_pointer_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maximum_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maxitems_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maxlength_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_maxproperties_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_minimum_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_minimum_validation_with_signed_integer_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_minitems_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_minlength_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_minproperties_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_nested_items_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_not_more_complex_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_not_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_nul_characters_in_strings_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_object_properties_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_oneof_complex_types_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_oneof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_base_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_empty_schema_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_oneof_with_required_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_pattern_is_not_anchored_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_pattern_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_properties_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_additionalproperties_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_allof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_anyof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_items_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_not_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_oneof_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_ref_in_property_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_required_default_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_required_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_required_with_empty_array_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_required_with_escaped_characters_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_simple_enum_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_uri_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_uri_reference_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -*ResponseContentContentTypeSchemaApi* | [**post_uri_template_format_response_body_for_content_types**](docs/apis/tags/ResponseContentContentTypeSchemaApi.md#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | -*TypeApi* | [**post_array_type_matches_arrays_request_body**](docs/apis/tags/TypeApi.md#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -*TypeApi* | [**post_array_type_matches_arrays_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -*TypeApi* | [**post_boolean_type_matches_booleans_request_body**](docs/apis/tags/TypeApi.md#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -*TypeApi* | [**post_boolean_type_matches_booleans_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -*TypeApi* | [**post_integer_type_matches_integers_request_body**](docs/apis/tags/TypeApi.md#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -*TypeApi* | [**post_integer_type_matches_integers_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -*TypeApi* | [**post_null_type_matches_only_the_null_object_request_body**](docs/apis/tags/TypeApi.md#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -*TypeApi* | [**post_null_type_matches_only_the_null_object_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -*TypeApi* | [**post_number_type_matches_numbers_request_body**](docs/apis/tags/TypeApi.md#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -*TypeApi* | [**post_number_type_matches_numbers_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -*TypeApi* | [**post_object_type_matches_objects_request_body**](docs/apis/tags/TypeApi.md#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -*TypeApi* | [**post_object_type_matches_objects_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -*TypeApi* | [**post_string_type_matches_strings_request_body**](docs/apis/tags/TypeApi.md#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -*TypeApi* | [**post_string_type_matches_strings_response_body_for_content_types**](docs/apis/tags/TypeApi.md#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -*UniqueItemsApi* | [**post_uniqueitems_false_validation_request_body**](docs/apis/tags/UniqueItemsApi.md#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -*UniqueItemsApi* | [**post_uniqueitems_false_validation_response_body_for_content_types**](docs/apis/tags/UniqueItemsApi.md#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -*UniqueItemsApi* | [**post_uniqueitems_validation_request_body**](docs/apis/tags/UniqueItemsApi.md#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -*UniqueItemsApi* | [**post_uniqueitems_validation_response_body_for_content_types**](docs/apis/tags/UniqueItemsApi.md#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | - -## Documentation For Models - - - [AdditionalpropertiesAllowsASchemaWhichShouldValidate](docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) - - [AdditionalpropertiesAreAllowedByDefault](docs/models/AdditionalpropertiesAreAllowedByDefault.md) - - [AdditionalpropertiesCanExistByItself](docs/models/AdditionalpropertiesCanExistByItself.md) - - [AdditionalpropertiesShouldNotLookInApplicators](docs/models/AdditionalpropertiesShouldNotLookInApplicators.md) - - [Allof](docs/models/Allof.md) - - [AllofCombinedWithAnyofOneof](docs/models/AllofCombinedWithAnyofOneof.md) - - [AllofSimpleTypes](docs/models/AllofSimpleTypes.md) - - [AllofWithBaseSchema](docs/models/AllofWithBaseSchema.md) - - [AllofWithOneEmptySchema](docs/models/AllofWithOneEmptySchema.md) - - [AllofWithTheFirstEmptySchema](docs/models/AllofWithTheFirstEmptySchema.md) - - [AllofWithTheLastEmptySchema](docs/models/AllofWithTheLastEmptySchema.md) - - [AllofWithTwoEmptySchemas](docs/models/AllofWithTwoEmptySchemas.md) - - [Anyof](docs/models/Anyof.md) - - [AnyofComplexTypes](docs/models/AnyofComplexTypes.md) - - [AnyofWithBaseSchema](docs/models/AnyofWithBaseSchema.md) - - [AnyofWithOneEmptySchema](docs/models/AnyofWithOneEmptySchema.md) - - [ArrayTypeMatchesArrays](docs/models/ArrayTypeMatchesArrays.md) - - [BooleanTypeMatchesBooleans](docs/models/BooleanTypeMatchesBooleans.md) - - [ByInt](docs/models/ByInt.md) - - [ByNumber](docs/models/ByNumber.md) - - [BySmallNumber](docs/models/BySmallNumber.md) - - [DateTimeFormat](docs/models/DateTimeFormat.md) - - [EmailFormat](docs/models/EmailFormat.md) - - [EnumWith0DoesNotMatchFalse](docs/models/EnumWith0DoesNotMatchFalse.md) - - [EnumWith1DoesNotMatchTrue](docs/models/EnumWith1DoesNotMatchTrue.md) - - [EnumWithEscapedCharacters](docs/models/EnumWithEscapedCharacters.md) - - [EnumWithFalseDoesNotMatch0](docs/models/EnumWithFalseDoesNotMatch0.md) - - [EnumWithTrueDoesNotMatch1](docs/models/EnumWithTrueDoesNotMatch1.md) - - [EnumsInProperties](docs/models/EnumsInProperties.md) - - [ForbiddenProperty](docs/models/ForbiddenProperty.md) - - [HostnameFormat](docs/models/HostnameFormat.md) - - [IntegerTypeMatchesIntegers](docs/models/IntegerTypeMatchesIntegers.md) - - [InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf](docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) - - [InvalidStringValueForDefault](docs/models/InvalidStringValueForDefault.md) - - [Ipv4Format](docs/models/Ipv4Format.md) - - [Ipv6Format](docs/models/Ipv6Format.md) - - [JsonPointerFormat](docs/models/JsonPointerFormat.md) - - [MaximumValidation](docs/models/MaximumValidation.md) - - [MaximumValidationWithUnsignedInteger](docs/models/MaximumValidationWithUnsignedInteger.md) - - [MaxitemsValidation](docs/models/MaxitemsValidation.md) - - [MaxlengthValidation](docs/models/MaxlengthValidation.md) - - [Maxproperties0MeansTheObjectIsEmpty](docs/models/Maxproperties0MeansTheObjectIsEmpty.md) - - [MaxpropertiesValidation](docs/models/MaxpropertiesValidation.md) - - [MinimumValidation](docs/models/MinimumValidation.md) - - [MinimumValidationWithSignedInteger](docs/models/MinimumValidationWithSignedInteger.md) - - [MinitemsValidation](docs/models/MinitemsValidation.md) - - [MinlengthValidation](docs/models/MinlengthValidation.md) - - [MinpropertiesValidation](docs/models/MinpropertiesValidation.md) - - [ModelNot](docs/models/ModelNot.md) - - [NestedAllofToCheckValidationSemantics](docs/models/NestedAllofToCheckValidationSemantics.md) - - [NestedAnyofToCheckValidationSemantics](docs/models/NestedAnyofToCheckValidationSemantics.md) - - [NestedItems](docs/models/NestedItems.md) - - [NestedOneofToCheckValidationSemantics](docs/models/NestedOneofToCheckValidationSemantics.md) - - [NotMoreComplexSchema](docs/models/NotMoreComplexSchema.md) - - [NulCharactersInStrings](docs/models/NulCharactersInStrings.md) - - [NullTypeMatchesOnlyTheNullObject](docs/models/NullTypeMatchesOnlyTheNullObject.md) - - [NumberTypeMatchesNumbers](docs/models/NumberTypeMatchesNumbers.md) - - [ObjectPropertiesValidation](docs/models/ObjectPropertiesValidation.md) - - [Oneof](docs/models/Oneof.md) - - [OneofComplexTypes](docs/models/OneofComplexTypes.md) - - [OneofWithBaseSchema](docs/models/OneofWithBaseSchema.md) - - [OneofWithEmptySchema](docs/models/OneofWithEmptySchema.md) - - [OneofWithRequired](docs/models/OneofWithRequired.md) - - [PatternIsNotAnchored](docs/models/PatternIsNotAnchored.md) - - [PatternValidation](docs/models/PatternValidation.md) - - [PropertiesWithEscapedCharacters](docs/models/PropertiesWithEscapedCharacters.md) - - [PropertyNamedRefThatIsNotAReference](docs/models/PropertyNamedRefThatIsNotAReference.md) - - [RefInAdditionalproperties](docs/models/RefInAdditionalproperties.md) - - [RefInAllof](docs/models/RefInAllof.md) - - [RefInAnyof](docs/models/RefInAnyof.md) - - [RefInItems](docs/models/RefInItems.md) - - [RefInNot](docs/models/RefInNot.md) - - [RefInOneof](docs/models/RefInOneof.md) - - [RefInProperty](docs/models/RefInProperty.md) - - [RequiredDefaultValidation](docs/models/RequiredDefaultValidation.md) - - [RequiredValidation](docs/models/RequiredValidation.md) - - [RequiredWithEmptyArray](docs/models/RequiredWithEmptyArray.md) - - [RequiredWithEscapedCharacters](docs/models/RequiredWithEscapedCharacters.md) - - [SimpleEnumValidation](docs/models/SimpleEnumValidation.md) - - [StringTypeMatchesStrings](docs/models/StringTypeMatchesStrings.md) - - [TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing](docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) - - [UniqueitemsFalseValidation](docs/models/UniqueitemsFalseValidation.md) - - [UniqueitemsValidation](docs/models/UniqueitemsValidation.md) - - [UriFormat](docs/models/UriFormat.md) - - [UriReferenceFormat](docs/models/UriReferenceFormat.md) - - [UriTemplateFormat](docs/models/UriTemplateFormat.md) - -## Documentation For Authorization - - Endpoints do not require authorization. - - -## Author - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in unit_test_api.apis and unit_test_api.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from unit_test_api.apis.default_api import DefaultApi` -- `from unit_test_api.model.pet import Pet` - -Solution 1: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import unit_test_api -from unit_test_api.apis import * -from unit_test_api.models import * -``` diff --git a/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AdditionalPropertiesApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AdditionalPropertiesApi.md deleted file mode 100644 index 7fb4cec497c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AdditionalPropertiesApi.md +++ /dev/null @@ -1,545 +0,0 @@ - -# unit_test_api.apis.tags.additional_properties_api.AdditionalPropertiesApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -[**post_additionalproperties_are_allowed_by_default_request_body**](#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -[**post_additionalproperties_can_exist_by_itself_request_body**](#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** - -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** - -> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_request_body** - -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** - -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_request_body** - -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** - -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** - -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** - -> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import additional_properties_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = additional_properties_api.AdditionalPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AdditionalPropertiesApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AllOfApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AllOfApi.md deleted file mode 100644 index 610cef7e4e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AllOfApi.md +++ /dev/null @@ -1,1205 +0,0 @@ - -# unit_test_api.apis.tags.all_of_api.AllOfApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_allof_combined_with_anyof_oneof_request_body**](#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -[**post_allof_request_body**](#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -[**post_allof_response_body_for_content_types**](#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -[**post_allof_simple_types_request_body**](#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_simple_types_response_body_for_content_types**](#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -[**post_allof_with_base_schema_request_body**](#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_base_schema_response_body_for_content_types**](#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -[**post_allof_with_one_empty_schema_request_body**](#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_one_empty_schema_response_body_for_content_types**](#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_first_empty_schema_request_body**](#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_last_empty_schema_request_body**](#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_two_empty_schemas_request_body**](#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_allof_with_two_empty_schemas_response_body_for_content_types**](#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -[**post_nested_allof_to_check_validation_semantics_request_body**](#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | - -# **post_allof_combined_with_anyof_oneof_request_body** - -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** - -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_request_body** - -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_request_body.ApiResponseFor200) | success - -#### post_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_response_body_for_content_types** - -> Allof post_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_request_body** - -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_simple_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_request_body.ApiResponseFor200) | success - -#### post_allof_simple_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_response_body_for_content_types** - -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_simple_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_request_body** - -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_response_body_for_content_types** - -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_request_body** - -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_response_body_for_content_types** - -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_request_body** - -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_response_body_for_content_types** - -> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_request_body** - -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_response_body_for_content_types** - -> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_request_body** - -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_request_body.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_response_body_for_content_types** - -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_request_body** - -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import all_of_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = all_of_api.AllOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AllOfApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AnyOfApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AnyOfApi.md deleted file mode 100644 index 628785c5e66..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/AnyOfApi.md +++ /dev/null @@ -1,673 +0,0 @@ - -# unit_test_api.apis.tags.any_of_api.AnyOfApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_anyof_complex_types_request_body**](#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_complex_types_response_body_for_content_types**](#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -[**post_anyof_request_body**](#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -[**post_anyof_response_body_for_content_types**](#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -[**post_anyof_with_base_schema_request_body**](#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_base_schema_response_body_for_content_types**](#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -[**post_anyof_with_one_empty_schema_request_body**](#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_anyof_with_one_empty_schema_response_body_for_content_types**](#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_nested_anyof_to_check_validation_semantics_request_body**](#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | - -# **post_anyof_complex_types_request_body** - -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_request_body.ApiResponseFor200) | success - -#### post_anyof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_response_body_for_content_types** - -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_request_body** - -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_request_body.ApiResponseFor200) | success - -#### post_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_response_body_for_content_types** - -> Anyof post_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_request_body** - -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_response_body_for_content_types** - -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_request_body** - -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_response_body_for_content_types** - -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_request_body** - -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import any_of_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = any_of_api.AnyOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling AnyOfApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ContentTypeJsonApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ContentTypeJsonApi.md deleted file mode 100644 index f7c13b27e1d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ContentTypeJsonApi.md +++ /dev/null @@ -1,11681 +0,0 @@ - -# unit_test_api.apis.tags.content_type_json_api.ContentTypeJsonApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -[**post_additionalproperties_are_allowed_by_default_request_body**](#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -[**post_additionalproperties_can_exist_by_itself_request_body**](#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -[**post_allof_combined_with_anyof_oneof_request_body**](#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -[**post_allof_request_body**](#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -[**post_allof_response_body_for_content_types**](#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -[**post_allof_simple_types_request_body**](#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_simple_types_response_body_for_content_types**](#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -[**post_allof_with_base_schema_request_body**](#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_base_schema_response_body_for_content_types**](#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -[**post_allof_with_one_empty_schema_request_body**](#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_one_empty_schema_response_body_for_content_types**](#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_first_empty_schema_request_body**](#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_last_empty_schema_request_body**](#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_two_empty_schemas_request_body**](#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_allof_with_two_empty_schemas_response_body_for_content_types**](#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -[**post_anyof_complex_types_request_body**](#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_complex_types_response_body_for_content_types**](#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -[**post_anyof_request_body**](#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -[**post_anyof_response_body_for_content_types**](#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -[**post_anyof_with_base_schema_request_body**](#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_base_schema_response_body_for_content_types**](#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -[**post_anyof_with_one_empty_schema_request_body**](#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_anyof_with_one_empty_schema_response_body_for_content_types**](#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_array_type_matches_arrays_request_body**](#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_array_type_matches_arrays_response_body_for_content_types**](#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -[**post_boolean_type_matches_booleans_request_body**](#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_boolean_type_matches_booleans_response_body_for_content_types**](#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -[**post_by_int_request_body**](#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -[**post_by_int_response_body_for_content_types**](#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -[**post_by_number_request_body**](#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -[**post_by_number_response_body_for_content_types**](#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -[**post_by_small_number_request_body**](#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -[**post_by_small_number_response_body_for_content_types**](#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -[**post_date_time_format_request_body**](#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -[**post_date_time_format_response_body_for_content_types**](#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -[**post_email_format_request_body**](#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -[**post_email_format_response_body_for_content_types**](#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -[**post_enum_with0_does_not_match_false_request_body**](#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with0_does_not_match_false_response_body_for_content_types**](#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -[**post_enum_with1_does_not_match_true_request_body**](#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with1_does_not_match_true_response_body_for_content_types**](#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -[**post_enum_with_escaped_characters_request_body**](#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_escaped_characters_response_body_for_content_types**](#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -[**post_enum_with_false_does_not_match0_request_body**](#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_false_does_not_match0_response_body_for_content_types**](#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -[**post_enum_with_true_does_not_match1_request_body**](#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enum_with_true_does_not_match1_response_body_for_content_types**](#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -[**post_enums_in_properties_request_body**](#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -[**post_enums_in_properties_response_body_for_content_types**](#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -[**post_forbidden_property_request_body**](#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -[**post_forbidden_property_response_body_for_content_types**](#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -[**post_hostname_format_request_body**](#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -[**post_hostname_format_response_body_for_content_types**](#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -[**post_integer_type_matches_integers_request_body**](#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_integer_type_matches_integers_response_body_for_content_types**](#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -[**post_invalid_string_value_for_default_request_body**](#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_invalid_string_value_for_default_response_body_for_content_types**](#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -[**post_ipv4_format_request_body**](#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -[**post_ipv4_format_response_body_for_content_types**](#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -[**post_ipv6_format_request_body**](#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -[**post_ipv6_format_response_body_for_content_types**](#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -[**post_json_pointer_format_request_body**](#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -[**post_json_pointer_format_response_body_for_content_types**](#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -[**post_maximum_validation_request_body**](#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_response_body_for_content_types**](#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -[**post_maximum_validation_with_unsigned_integer_request_body**](#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -[**post_maxitems_validation_request_body**](#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxitems_validation_response_body_for_content_types**](#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -[**post_maxlength_validation_request_body**](#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxlength_validation_response_body_for_content_types**](#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -[**post_maxproperties0_means_the_object_is_empty_request_body**](#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -[**post_maxproperties_validation_request_body**](#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_maxproperties_validation_response_body_for_content_types**](#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -[**post_minimum_validation_request_body**](#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_response_body_for_content_types**](#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -[**post_minimum_validation_with_signed_integer_request_body**](#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -[**post_minitems_validation_request_body**](#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -[**post_minitems_validation_response_body_for_content_types**](#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -[**post_minlength_validation_request_body**](#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -[**post_minlength_validation_response_body_for_content_types**](#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -[**post_minproperties_validation_request_body**](#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -[**post_minproperties_validation_response_body_for_content_types**](#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -[**post_nested_allof_to_check_validation_semantics_request_body**](#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_anyof_to_check_validation_semantics_request_body**](#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_items_request_body**](#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -[**post_nested_items_response_body_for_content_types**](#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -[**post_nested_oneof_to_check_validation_semantics_request_body**](#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_not_more_complex_schema_request_body**](#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_more_complex_schema_response_body_for_content_types**](#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -[**post_not_request_body**](#post_not_request_body) | **post** /requestBody/postNotRequestBody | -[**post_not_response_body_for_content_types**](#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -[**post_nul_characters_in_strings_request_body**](#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -[**post_nul_characters_in_strings_response_body_for_content_types**](#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -[**post_null_type_matches_only_the_null_object_request_body**](#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -[**post_number_type_matches_numbers_request_body**](#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_number_type_matches_numbers_response_body_for_content_types**](#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -[**post_object_properties_validation_request_body**](#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_properties_validation_response_body_for_content_types**](#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -[**post_object_type_matches_objects_request_body**](#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_object_type_matches_objects_response_body_for_content_types**](#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -[**post_oneof_complex_types_request_body**](#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_complex_types_response_body_for_content_types**](#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -[**post_oneof_request_body**](#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -[**post_oneof_response_body_for_content_types**](#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -[**post_oneof_with_base_schema_request_body**](#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -[**post_pattern_validation_response_body_for_content_types**](#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -[**post_properties_with_escaped_characters_request_body**](#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_properties_with_escaped_characters_response_body_for_content_types**](#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -[**post_property_named_ref_that_is_not_a_reference_request_body**](#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -[**post_ref_in_additionalproperties_request_body**](#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_additionalproperties_response_body_for_content_types**](#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -[**post_ref_in_allof_request_body**](#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_allof_response_body_for_content_types**](#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -[**post_ref_in_anyof_request_body**](#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_anyof_response_body_for_content_types**](#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -[**post_ref_in_items_request_body**](#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_items_response_body_for_content_types**](#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -[**post_ref_in_not_request_body**](#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -[**post_ref_in_not_response_body_for_content_types**](#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -[**post_ref_in_oneof_request_body**](#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_oneof_response_body_for_content_types**](#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -[**post_ref_in_property_request_body**](#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -[**post_ref_in_property_response_body_for_content_types**](#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -[**post_required_default_validation_request_body**](#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_default_validation_response_body_for_content_types**](#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -[**post_required_validation_request_body**](#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_string_type_matches_strings_response_body_for_content_types**](#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -[**post_uniqueitems_false_validation_request_body**](#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_false_validation_response_body_for_content_types**](#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -[**post_uniqueitems_validation_request_body**](#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uniqueitems_validation_response_body_for_content_types**](#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -[**post_uri_format_request_body**](#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -[**post_uri_format_response_body_for_content_types**](#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -[**post_uri_reference_format_request_body**](#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_reference_format_response_body_for_content_types**](#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -[**post_uri_template_format_request_body**](#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -[**post_uri_template_format_response_body_for_content_types**](#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** - -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** - -> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_request_body** - -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** - -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_request_body** - -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** - -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** - -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** - -> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_request_body** - -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** - -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_request_body** - -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_request_body.ApiResponseFor200) | success - -#### post_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_response_body_for_content_types** - -> Allof post_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_request_body** - -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_simple_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_request_body.ApiResponseFor200) | success - -#### post_allof_simple_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_response_body_for_content_types** - -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_simple_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_request_body** - -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_response_body_for_content_types** - -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_request_body** - -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_response_body_for_content_types** - -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_request_body** - -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_response_body_for_content_types** - -> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_request_body** - -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_response_body_for_content_types** - -> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_request_body** - -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_request_body.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_response_body_for_content_types** - -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_request_body** - -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_request_body.ApiResponseFor200) | success - -#### post_anyof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_response_body_for_content_types** - -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_request_body** - -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_request_body.ApiResponseFor200) | success - -#### post_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_response_body_for_content_types** - -> Anyof post_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_request_body** - -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_response_body_for_content_types** - -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_request_body** - -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_response_body_for_content_types** - -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_request_body** - -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_array_type_matches_arrays_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_request_body.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_response_body_for_content_types** - -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_request_body** - -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_request_body.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_response_body_for_content_types** - -> bool post_boolean_type_matches_booleans_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_request_body** - -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_int_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_request_body.ApiResponseFor200) | success - -#### post_by_int_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_response_body_for_content_types** - -> ByInt post_by_int_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_int_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_int_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_int_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_request_body** - -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_request_body.ApiResponseFor200) | success - -#### post_by_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_response_body_for_content_types** - -> ByNumber post_by_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_request_body** - -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_small_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_request_body.ApiResponseFor200) | success - -#### post_by_small_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_response_body_for_content_types** - -> BySmallNumber post_by_small_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_small_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_by_small_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_request_body** - -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_date_time_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_request_body.ApiResponseFor200) | success - -#### post_date_time_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_date_time_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_date_time_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_request_body** - -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_email_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_request_body.ApiResponseFor200) | success - -#### post_email_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_email_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_email_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_email_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_request_body** - -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_request_body.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_response_body_for_content_types** - -> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_request_body** - -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_request_body.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_response_body_for_content_types** - -> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_request_body** - -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo\nbar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_response_body_for_content_types** - -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_request_body** - -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_request_body.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_response_body_for_content_types** - -> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_request_body** - -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_request_body.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_response_body_for_content_types** - -> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_request_body** - -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enums_in_properties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_request_body.ApiResponseFor200) | success - -#### post_enums_in_properties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_response_body_for_content_types** - -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enums_in_properties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_request_body** - -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_forbidden_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_request_body.ApiResponseFor200) | success - -#### post_forbidden_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_response_body_for_content_types** - -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_forbidden_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_request_body** - -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_hostname_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_request_body.ApiResponseFor200) | success - -#### post_hostname_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_hostname_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_hostname_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_request_body** - -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_integer_type_matches_integers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_request_body.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_response_body_for_content_types** - -> int post_integer_type_matches_integers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** - -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** - -> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_request_body** - -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_invalid_string_value_for_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_request_body.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_response_body_for_content_types** - -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_request_body** - -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ipv4_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_request_body.ApiResponseFor200) | success - -#### post_ipv4_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv4_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_request_body** - -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ipv6_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_request_body.ApiResponseFor200) | success - -#### post_ipv6_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv6_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_request_body** - -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_json_pointer_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_request_body.ApiResponseFor200) | success - -#### post_json_pointer_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_json_pointer_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_request_body** - -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maximum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_response_body_for_content_types** - -> MaximumValidation post_maximum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_request_body** - -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** - -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_request_body** - -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_request_body.ApiResponseFor200) | success - -#### post_maxitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_response_body_for_content_types** - -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_request_body** - -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_request_body.ApiResponseFor200) | success - -#### post_maxlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_response_body_for_content_types** - -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_request_body** - -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** - -> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_request_body** - -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_request_body.ApiResponseFor200) | success - -#### post_maxproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_response_body_for_content_types** - -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_request_body** - -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minimum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_response_body_for_content_types** - -> MinimumValidation post_minimum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_request_body** - -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_response_body_for_content_types** - -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_request_body** - -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_request_body.ApiResponseFor200) | success - -#### post_minitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_response_body_for_content_types** - -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_request_body** - -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_request_body.ApiResponseFor200) | success - -#### post_minlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_response_body_for_content_types** - -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_request_body** - -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_request_body.ApiResponseFor200) | success - -#### post_minproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_response_body_for_content_types** - -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_request_body** - -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_request_body** - -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_request_body** - -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_request_body.ApiResponseFor200) | success - -#### post_nested_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_response_body_for_content_types** - -> NestedItems post_nested_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_request_body** - -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** - -> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_request_body** - -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_not_more_complex_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_request_body.ApiResponseFor200) | success - -#### post_not_more_complex_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_request_body** - -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_request_body.ApiResponseFor200) | success - -#### post_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_request_body** - -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hello\x00there") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nul_characters_in_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_request_body.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_response_body_for_content_types** - -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_request_body** - -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_response_body_for_content_types** - -> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_request_body** - -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_number_type_matches_numbers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_request_body.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_response_body_for_content_types** - -> int, float post_number_type_matches_numbers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_request_body** - -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_object_properties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_request_body.ApiResponseFor200) | success - -#### post_object_properties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_response_body_for_content_types** - -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_properties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_request_body** - -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_object_type_matches_objects_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_request_body.ApiResponseFor200) | success - -#### post_object_type_matches_objects_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_response_body_for_content_types** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_request_body** - -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_request_body.ApiResponseFor200) | success - -#### post_oneof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_response_body_for_content_types** - -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_request_body** - -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_request_body.ApiResponseFor200) | success - -#### post_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_response_body_for_content_types** - -> Oneof post_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_request_body** - -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_response_body_for_content_types** - -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_request_body** - -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_response_body_for_content_types** - -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_request_body** - -> post_oneof_with_required_request_body(oneof_with_required) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithRequired() - try: - api_response = api_instance.post_oneof_with_required_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_required_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_request_body.ApiResponseFor200) | success - -#### post_oneof_with_required_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_response_body_for_content_types** - -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_required_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_request_body** - -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_pattern_is_not_anchored_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_request_body.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_response_body_for_content_types** - -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_request_body** - -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_pattern_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_request_body.ApiResponseFor200) | success - -#### post_pattern_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_response_body_for_content_types** - -> PatternValidation post_pattern_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_request_body** - -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_properties_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_response_body_for_content_types** - -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_request_body** - -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** - -> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_request_body** - -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_additionalproperties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_request_body.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_response_body_for_content_types** - -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_request_body** - -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_request_body.ApiResponseFor200) | success - -#### post_ref_in_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_response_body_for_content_types** - -> RefInAllof post_ref_in_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_request_body** - -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_request_body.ApiResponseFor200) | success - -#### post_ref_in_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_response_body_for_content_types** - -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_request_body** - -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_request_body.ApiResponseFor200) | success - -#### post_ref_in_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_response_body_for_content_types** - -> RefInItems post_ref_in_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_request_body** - -> post_ref_in_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ref_in_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_request_body.ApiResponseFor200) | success - -#### post_ref_in_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ref_in_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_request_body** - -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_request_body.ApiResponseFor200) | success - -#### post_ref_in_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_response_body_for_content_types** - -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_request_body** - -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_request_body.ApiResponseFor200) | success - -#### post_ref_in_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_response_body_for_content_types** - -> RefInProperty post_ref_in_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_request_body** - -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_default_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_request_body.ApiResponseFor200) | success - -#### post_required_default_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_response_body_for_content_types** - -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_default_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_request_body** - -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_request_body.ApiResponseFor200) | success - -#### post_required_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_response_body_for_content_types** - -> RequiredValidation post_required_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_request_body** - -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_with_empty_array_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_request_body.ApiResponseFor200) | success - -#### post_required_with_empty_array_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_response_body_for_content_types** - -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_request_body** - -> post_required_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_required_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_request_body** - -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_simple_enum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_request_body.ApiResponseFor200) | success - -#### post_simple_enum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_response_body_for_content_types** - -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_request_body** - -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_string_type_matches_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_request_body.ApiResponseFor200) | success - -#### post_string_type_matches_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_response_body_for_content_types** - -> str post_string_type_matches_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** - -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** - -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_request_body** - -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uniqueitems_false_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_response_body_for_content_types** - -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_request_body** - -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uniqueitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_response_body_for_content_types** - -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_request_body** - -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_request_body.ApiResponseFor200) | success - -#### post_uri_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_request_body** - -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_reference_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_request_body.ApiResponseFor200) | success - -#### post_uri_reference_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_reference_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_request_body** - -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_template_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_request_body.ApiResponseFor200) | success - -#### post_uri_template_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import content_type_json_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = content_type_json_api.ContentTypeJsonApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_template_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ContentTypeJsonApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/DefaultApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/DefaultApi.md deleted file mode 100644 index 19d9fd308b4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/DefaultApi.md +++ /dev/null @@ -1,276 +0,0 @@ - -# unit_test_api.apis.tags.default_api.DefaultApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_invalid_string_value_for_default_request_body**](#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_invalid_string_value_for_default_response_body_for_content_types**](#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | - -# **post_invalid_string_value_for_default_request_body** - -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import default_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling DefaultApi->post_invalid_string_value_for_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_request_body.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_response_body_for_content_types** - -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import default_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling DefaultApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** - -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import default_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling DefaultApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** - -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import default_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling DefaultApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/EnumApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/EnumApi.md deleted file mode 100644 index fb97ba1ba3f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/EnumApi.md +++ /dev/null @@ -1,1075 +0,0 @@ - -# unit_test_api.apis.tags.enum_api.EnumApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_enum_with0_does_not_match_false_request_body**](#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with0_does_not_match_false_response_body_for_content_types**](#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -[**post_enum_with1_does_not_match_true_request_body**](#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with1_does_not_match_true_response_body_for_content_types**](#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -[**post_enum_with_escaped_characters_request_body**](#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_escaped_characters_response_body_for_content_types**](#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -[**post_enum_with_false_does_not_match0_request_body**](#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_false_does_not_match0_response_body_for_content_types**](#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -[**post_enum_with_true_does_not_match1_request_body**](#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enum_with_true_does_not_match1_response_body_for_content_types**](#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -[**post_enums_in_properties_request_body**](#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -[**post_enums_in_properties_response_body_for_content_types**](#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -[**post_nul_characters_in_strings_request_body**](#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -[**post_nul_characters_in_strings_response_body_for_content_types**](#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | - -# **post_enum_with0_does_not_match_false_request_body** - -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_request_body.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_response_body_for_content_types** - -> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_request_body** - -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_request_body.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_response_body_for_content_types** - -> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_request_body** - -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo\nbar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_response_body_for_content_types** - -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_request_body** - -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_request_body.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_response_body_for_content_types** - -> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_request_body** - -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_request_body.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_response_body_for_content_types** - -> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_request_body** - -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enums_in_properties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_request_body.ApiResponseFor200) | success - -#### post_enums_in_properties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_response_body_for_content_types** - -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enums_in_properties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_request_body** - -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hello\x00there") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_nul_characters_in_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_request_body.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_response_body_for_content_types** - -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_request_body** - -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_simple_enum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_request_body.ApiResponseFor200) | success - -#### post_simple_enum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_response_body_for_content_types** - -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import enum_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = enum_api.EnumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling EnumApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/FormatApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/FormatApi.md deleted file mode 100644 index b1b6b115e74..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/FormatApi.md +++ /dev/null @@ -1,1205 +0,0 @@ - -# unit_test_api.apis.tags.format_api.FormatApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_date_time_format_request_body**](#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -[**post_date_time_format_response_body_for_content_types**](#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -[**post_email_format_request_body**](#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -[**post_email_format_response_body_for_content_types**](#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -[**post_hostname_format_request_body**](#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -[**post_hostname_format_response_body_for_content_types**](#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -[**post_ipv4_format_request_body**](#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -[**post_ipv4_format_response_body_for_content_types**](#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -[**post_ipv6_format_request_body**](#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -[**post_ipv6_format_response_body_for_content_types**](#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -[**post_json_pointer_format_request_body**](#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -[**post_json_pointer_format_response_body_for_content_types**](#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -[**post_uri_format_request_body**](#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -[**post_uri_format_response_body_for_content_types**](#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -[**post_uri_reference_format_request_body**](#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_reference_format_response_body_for_content_types**](#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -[**post_uri_template_format_request_body**](#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -[**post_uri_template_format_response_body_for_content_types**](#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | - -# **post_date_time_format_request_body** - -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_date_time_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_request_body.ApiResponseFor200) | success - -#### post_date_time_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_date_time_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_date_time_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_request_body** - -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_email_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_request_body.ApiResponseFor200) | success - -#### post_email_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_email_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_email_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_email_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_request_body** - -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_hostname_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_request_body.ApiResponseFor200) | success - -#### post_hostname_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_hostname_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_hostname_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_request_body** - -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_ipv4_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_request_body.ApiResponseFor200) | success - -#### post_ipv4_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv4_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_request_body** - -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_ipv6_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_request_body.ApiResponseFor200) | success - -#### post_ipv6_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv6_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_request_body** - -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_json_pointer_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_request_body.ApiResponseFor200) | success - -#### post_json_pointer_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_json_pointer_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_request_body** - -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_request_body.ApiResponseFor200) | success - -#### post_uri_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_request_body** - -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_reference_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_request_body.ApiResponseFor200) | success - -#### post_uri_reference_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_reference_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_request_body** - -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_template_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_request_body.ApiResponseFor200) | success - -#### post_uri_template_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import format_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = format_api.FormatApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_template_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling FormatApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ItemsApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ItemsApi.md deleted file mode 100644 index 1bc05726e29..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ItemsApi.md +++ /dev/null @@ -1,149 +0,0 @@ - -# unit_test_api.apis.tags.items_api.ItemsApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_nested_items_request_body**](#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -[**post_nested_items_response_body_for_content_types**](#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | - -# **post_nested_items_request_body** - -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import items_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = items_api.ItemsApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ItemsApi->post_nested_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_request_body.ApiResponseFor200) | success - -#### post_nested_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_response_body_for_content_types** - -> NestedItems post_nested_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import items_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = items_api.ItemsApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ItemsApi->post_nested_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxItemsApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxItemsApi.md deleted file mode 100644 index 6f26aa95c70..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxItemsApi.md +++ /dev/null @@ -1,141 +0,0 @@ - -# unit_test_api.apis.tags.max_items_api.MaxItemsApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_maxitems_validation_request_body**](#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxitems_validation_response_body_for_content_types**](#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | - -# **post_maxitems_validation_request_body** - -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_items_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_items_api.MaxItemsApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaxItemsApi->post_maxitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_request_body.ApiResponseFor200) | success - -#### post_maxitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_response_body_for_content_types** - -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_items_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_items_api.MaxItemsApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaxItemsApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxLengthApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxLengthApi.md deleted file mode 100644 index ceef7d4b589..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxLengthApi.md +++ /dev/null @@ -1,141 +0,0 @@ - -# unit_test_api.apis.tags.max_length_api.MaxLengthApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_maxlength_validation_request_body**](#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxlength_validation_response_body_for_content_types**](#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | - -# **post_maxlength_validation_request_body** - -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_length_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_length_api.MaxLengthApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaxLengthApi->post_maxlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_request_body.ApiResponseFor200) | success - -#### post_maxlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_response_body_for_content_types** - -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_length_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_length_api.MaxLengthApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaxLengthApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxPropertiesApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxPropertiesApi.md deleted file mode 100644 index 09318128a1a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaxPropertiesApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.max_properties_api.MaxPropertiesApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_maxproperties0_means_the_object_is_empty_request_body**](#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -[**post_maxproperties_validation_request_body**](#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_maxproperties_validation_response_body_for_content_types**](#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | - -# **post_maxproperties0_means_the_object_is_empty_request_body** - -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_properties_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_properties_api.MaxPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaxPropertiesApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** - -> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_properties_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_properties_api.MaxPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaxPropertiesApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_request_body** - -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_properties_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_properties_api.MaxPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaxPropertiesApi->post_maxproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_request_body.ApiResponseFor200) | success - -#### post_maxproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_response_body_for_content_types** - -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import max_properties_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = max_properties_api.MaxPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaxPropertiesApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaximumApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaximumApi.md deleted file mode 100644 index ba2295a3901..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MaximumApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.maximum_api.MaximumApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_maximum_validation_request_body**](#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_response_body_for_content_types**](#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -[**post_maximum_validation_with_unsigned_integer_request_body**](#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | - -# **post_maximum_validation_request_body** - -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import maximum_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = maximum_api.MaximumApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaximumApi->post_maximum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_response_body_for_content_types** - -> MaximumValidation post_maximum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import maximum_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = maximum_api.MaximumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaximumApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_request_body** - -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import maximum_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = maximum_api.MaximumApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MaximumApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** - -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import maximum_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = maximum_api.MaximumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MaximumApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinItemsApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinItemsApi.md deleted file mode 100644 index aec6ce2b7b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinItemsApi.md +++ /dev/null @@ -1,141 +0,0 @@ - -# unit_test_api.apis.tags.min_items_api.MinItemsApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_minitems_validation_request_body**](#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -[**post_minitems_validation_response_body_for_content_types**](#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | - -# **post_minitems_validation_request_body** - -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_items_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_items_api.MinItemsApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MinItemsApi->post_minitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_request_body.ApiResponseFor200) | success - -#### post_minitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_response_body_for_content_types** - -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_items_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_items_api.MinItemsApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MinItemsApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinLengthApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinLengthApi.md deleted file mode 100644 index 965b90d10db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinLengthApi.md +++ /dev/null @@ -1,141 +0,0 @@ - -# unit_test_api.apis.tags.min_length_api.MinLengthApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_minlength_validation_request_body**](#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -[**post_minlength_validation_response_body_for_content_types**](#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | - -# **post_minlength_validation_request_body** - -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_length_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_length_api.MinLengthApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MinLengthApi->post_minlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_request_body.ApiResponseFor200) | success - -#### post_minlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_response_body_for_content_types** - -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_length_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_length_api.MinLengthApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MinLengthApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinPropertiesApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinPropertiesApi.md deleted file mode 100644 index 987f0f50ecb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinPropertiesApi.md +++ /dev/null @@ -1,141 +0,0 @@ - -# unit_test_api.apis.tags.min_properties_api.MinPropertiesApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_minproperties_validation_request_body**](#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -[**post_minproperties_validation_response_body_for_content_types**](#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | - -# **post_minproperties_validation_request_body** - -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_properties_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_properties_api.MinPropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MinPropertiesApi->post_minproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_request_body.ApiResponseFor200) | success - -#### post_minproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_response_body_for_content_types** - -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import min_properties_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = min_properties_api.MinPropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MinPropertiesApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinimumApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinimumApi.md deleted file mode 100644 index cb7a4411b2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MinimumApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.minimum_api.MinimumApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_minimum_validation_request_body**](#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_response_body_for_content_types**](#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -[**post_minimum_validation_with_signed_integer_request_body**](#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | - -# **post_minimum_validation_request_body** - -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import minimum_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = minimum_api.MinimumApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MinimumApi->post_minimum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_response_body_for_content_types** - -> MinimumValidation post_minimum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import minimum_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = minimum_api.MinimumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MinimumApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_request_body** - -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import minimum_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = minimum_api.MinimumApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MinimumApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_response_body_for_content_types** - -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import minimum_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = minimum_api.MinimumApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MinimumApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ModelNotApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ModelNotApi.md deleted file mode 100644 index 37556fb591f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ModelNotApi.md +++ /dev/null @@ -1,471 +0,0 @@ - -# unit_test_api.apis.tags.model_not_api.ModelNotApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_forbidden_property_request_body**](#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -[**post_forbidden_property_response_body_for_content_types**](#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -[**post_not_more_complex_schema_request_body**](#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_more_complex_schema_response_body_for_content_types**](#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -[**post_not_request_body**](#post_not_request_body) | **post** /requestBody/postNotRequestBody | -[**post_not_response_body_for_content_types**](#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | - -# **post_forbidden_property_request_body** - -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_forbidden_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_request_body.ApiResponseFor200) | success - -#### post_forbidden_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_response_body_for_content_types** - -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_forbidden_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_request_body** - -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_not_more_complex_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_request_body.ApiResponseFor200) | success - -#### post_not_more_complex_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_request_body** - -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_request_body.ApiResponseFor200) | success - -#### post_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import model_not_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = model_not_api.ModelNotApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ModelNotApi->post_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MultipleOfApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MultipleOfApi.md deleted file mode 100644 index 570a9d62f75..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/MultipleOfApi.md +++ /dev/null @@ -1,540 +0,0 @@ - -# unit_test_api.apis.tags.multiple_of_api.MultipleOfApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_by_int_request_body**](#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -[**post_by_int_response_body_for_content_types**](#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -[**post_by_number_request_body**](#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -[**post_by_number_response_body_for_content_types**](#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -[**post_by_small_number_request_body**](#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -[**post_by_small_number_response_body_for_content_types**](#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | - -# **post_by_int_request_body** - -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_int_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_request_body.ApiResponseFor200) | success - -#### post_by_int_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_response_body_for_content_types** - -> ByInt post_by_int_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_int_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_int_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_int_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_request_body** - -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_request_body.ApiResponseFor200) | success - -#### post_by_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_response_body_for_content_types** - -> ByNumber post_by_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_request_body** - -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_small_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_request_body.ApiResponseFor200) | success - -#### post_by_small_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_response_body_for_content_types** - -> BySmallNumber post_by_small_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_small_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_by_small_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** - -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** - -> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import multiple_of_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = multiple_of_api.MultipleOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling MultipleOfApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OneOfApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OneOfApi.md deleted file mode 100644 index eb6c99ccbce..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OneOfApi.md +++ /dev/null @@ -1,806 +0,0 @@ - -# unit_test_api.apis.tags.one_of_api.OneOfApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_nested_oneof_to_check_validation_semantics_request_body**](#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_oneof_complex_types_request_body**](#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_complex_types_response_body_for_content_types**](#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -[**post_oneof_request_body**](#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -[**post_oneof_response_body_for_content_types**](#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -[**post_oneof_with_base_schema_request_body**](#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | - -# **post_nested_oneof_to_check_validation_semantics_request_body** - -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** - -> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_request_body** - -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_request_body.ApiResponseFor200) | success - -#### post_oneof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_response_body_for_content_types** - -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_request_body** - -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_request_body.ApiResponseFor200) | success - -#### post_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_response_body_for_content_types** - -> Oneof post_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_request_body** - -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_response_body_for_content_types** - -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_request_body** - -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_response_body_for_content_types** - -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_request_body** - -> post_oneof_with_required_request_body(oneof_with_required) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithRequired() - try: - api_response = api_instance.post_oneof_with_required_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_required_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_request_body.ApiResponseFor200) | success - -#### post_oneof_with_required_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_response_body_for_content_types** - -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import one_of_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = one_of_api.OneOfApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_required_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling OneOfApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OperationRequestBodyApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OperationRequestBodyApi.md deleted file mode 100644 index 1e4a96248e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/OperationRequestBodyApi.md +++ /dev/null @@ -1,6335 +0,0 @@ - -# unit_test_api.apis.tags.operation_request_body_api.OperationRequestBodyApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_are_allowed_by_default_request_body**](#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_can_exist_by_itself_request_body**](#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_allof_combined_with_anyof_oneof_request_body**](#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_request_body**](#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -[**post_allof_simple_types_request_body**](#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_with_base_schema_request_body**](#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_one_empty_schema_request_body**](#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_request_body**](#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_request_body**](#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_two_empty_schemas_request_body**](#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_anyof_complex_types_request_body**](#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_request_body**](#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -[**post_anyof_with_base_schema_request_body**](#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_one_empty_schema_request_body**](#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_array_type_matches_arrays_request_body**](#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_boolean_type_matches_booleans_request_body**](#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_by_int_request_body**](#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -[**post_by_number_request_body**](#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -[**post_by_small_number_request_body**](#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -[**post_date_time_format_request_body**](#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -[**post_email_format_request_body**](#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -[**post_enum_with0_does_not_match_false_request_body**](#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with1_does_not_match_true_request_body**](#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with_escaped_characters_request_body**](#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_false_does_not_match0_request_body**](#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_true_does_not_match1_request_body**](#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enums_in_properties_request_body**](#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -[**post_forbidden_property_request_body**](#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -[**post_hostname_format_request_body**](#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -[**post_integer_type_matches_integers_request_body**](#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_string_value_for_default_request_body**](#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_ipv4_format_request_body**](#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -[**post_ipv6_format_request_body**](#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -[**post_json_pointer_format_request_body**](#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -[**post_maximum_validation_request_body**](#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_with_unsigned_integer_request_body**](#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maxitems_validation_request_body**](#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxlength_validation_request_body**](#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxproperties0_means_the_object_is_empty_request_body**](#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties_validation_request_body**](#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_minimum_validation_request_body**](#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_with_signed_integer_request_body**](#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minitems_validation_request_body**](#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -[**post_minlength_validation_request_body**](#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -[**post_minproperties_validation_request_body**](#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -[**post_nested_allof_to_check_validation_semantics_request_body**](#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_request_body**](#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_items_request_body**](#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_request_body**](#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_not_more_complex_schema_request_body**](#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_request_body**](#post_not_request_body) | **post** /requestBody/postNotRequestBody | -[**post_nul_characters_in_strings_request_body**](#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -[**post_null_type_matches_only_the_null_object_request_body**](#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_number_type_matches_numbers_request_body**](#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_object_properties_validation_request_body**](#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_type_matches_objects_request_body**](#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_oneof_complex_types_request_body**](#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_request_body**](#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -[**post_oneof_with_base_schema_request_body**](#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -[**post_properties_with_escaped_characters_request_body**](#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_property_named_ref_that_is_not_a_reference_request_body**](#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_ref_in_additionalproperties_request_body**](#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_allof_request_body**](#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_anyof_request_body**](#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_items_request_body**](#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_not_request_body**](#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -[**post_ref_in_oneof_request_body**](#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_property_request_body**](#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -[**post_required_default_validation_request_body**](#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_validation_request_body**](#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_uniqueitems_false_validation_request_body**](#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_validation_request_body**](#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uri_format_request_body**](#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -[**post_uri_reference_format_request_body**](#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_template_format_request_body**](#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** - -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_request_body** - -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_request_body** - -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** - -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_request_body** - -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_request_body** - -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_request_body.ApiResponseFor200) | success - -#### post_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_request_body** - -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_simple_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_request_body.ApiResponseFor200) | success - -#### post_allof_simple_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_request_body** - -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_request_body** - -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_request_body** - -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_request_body** - -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_request_body** - -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_request_body.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_request_body** - -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_anyof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_request_body.ApiResponseFor200) | success - -#### post_anyof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_request_body** - -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_request_body.ApiResponseFor200) | success - -#### post_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_request_body** - -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_anyof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_request_body** - -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_request_body** - -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_array_type_matches_arrays_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_request_body.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_request_body** - -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_request_body.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_request_body** - -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_by_int_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_request_body.ApiResponseFor200) | success - -#### post_by_int_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_request_body** - -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_by_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_request_body.ApiResponseFor200) | success - -#### post_by_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_request_body** - -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_by_small_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_request_body.ApiResponseFor200) | success - -#### post_by_small_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_request_body** - -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_date_time_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_request_body.ApiResponseFor200) | success - -#### post_date_time_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_request_body** - -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_email_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_request_body.ApiResponseFor200) | success - -#### post_email_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_request_body** - -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_request_body.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_request_body** - -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_request_body.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_request_body** - -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo\nbar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enum_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_request_body** - -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_request_body.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_request_body** - -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_request_body.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_request_body** - -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_enums_in_properties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_request_body.ApiResponseFor200) | success - -#### post_enums_in_properties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_request_body** - -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_forbidden_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_request_body.ApiResponseFor200) | success - -#### post_forbidden_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_request_body** - -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_hostname_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_request_body.ApiResponseFor200) | success - -#### post_hostname_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_request_body** - -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_integer_type_matches_integers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_request_body.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** - -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_request_body** - -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_invalid_string_value_for_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_request_body.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_request_body** - -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ipv4_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_request_body.ApiResponseFor200) | success - -#### post_ipv4_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_request_body** - -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ipv6_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_request_body.ApiResponseFor200) | success - -#### post_ipv6_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_request_body** - -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_json_pointer_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_request_body.ApiResponseFor200) | success - -#### post_json_pointer_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_request_body** - -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maximum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_request_body** - -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_request_body** - -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maxitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_request_body.ApiResponseFor200) | success - -#### post_maxitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_request_body** - -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maxlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_request_body.ApiResponseFor200) | success - -#### post_maxlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_request_body** - -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_request_body** - -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_maxproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_request_body.ApiResponseFor200) | success - -#### post_maxproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_request_body** - -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_minimum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_request_body** - -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_request_body** - -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_minitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_request_body.ApiResponseFor200) | success - -#### post_minitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_request_body** - -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_minlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_request_body.ApiResponseFor200) | success - -#### post_minlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_request_body** - -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_minproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_request_body.ApiResponseFor200) | success - -#### post_minproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_request_body** - -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_request_body** - -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_request_body** - -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_nested_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_request_body.ApiResponseFor200) | success - -#### post_nested_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_request_body** - -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_request_body** - -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_not_more_complex_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_request_body.ApiResponseFor200) | success - -#### post_not_more_complex_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_request_body** - -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_request_body.ApiResponseFor200) | success - -#### post_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_request_body** - -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hello\x00there") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_nul_characters_in_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_request_body.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_request_body** - -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_request_body** - -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_number_type_matches_numbers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_request_body.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_request_body** - -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_object_properties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_request_body.ApiResponseFor200) | success - -#### post_object_properties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_request_body** - -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_object_type_matches_objects_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_request_body.ApiResponseFor200) | success - -#### post_object_type_matches_objects_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_request_body** - -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_oneof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_request_body.ApiResponseFor200) | success - -#### post_oneof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_request_body** - -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_request_body.ApiResponseFor200) | success - -#### post_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_request_body** - -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_oneof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_request_body** - -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_oneof_with_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_request_body** - -> post_oneof_with_required_request_body(oneof_with_required) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithRequired() - try: - api_response = api_instance.post_oneof_with_required_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_oneof_with_required_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_request_body.ApiResponseFor200) | success - -#### post_oneof_with_required_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_request_body** - -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_pattern_is_not_anchored_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_request_body.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_request_body** - -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_pattern_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_request_body.ApiResponseFor200) | success - -#### post_pattern_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_request_body** - -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_properties_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_request_body** - -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_request_body** - -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_additionalproperties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_request_body.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_request_body** - -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_request_body.ApiResponseFor200) | success - -#### post_ref_in_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_request_body** - -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_request_body.ApiResponseFor200) | success - -#### post_ref_in_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_request_body** - -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_request_body.ApiResponseFor200) | success - -#### post_ref_in_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_request_body** - -> post_ref_in_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ref_in_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_request_body.ApiResponseFor200) | success - -#### post_ref_in_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_request_body** - -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_request_body.ApiResponseFor200) | success - -#### post_ref_in_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_request_body** - -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_ref_in_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_request_body.ApiResponseFor200) | success - -#### post_ref_in_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_request_body** - -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_required_default_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_request_body.ApiResponseFor200) | success - -#### post_required_default_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_request_body** - -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_required_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_request_body.ApiResponseFor200) | success - -#### post_required_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_request_body** - -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_required_with_empty_array_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_request_body.ApiResponseFor200) | success - -#### post_required_with_empty_array_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_request_body** - -> post_required_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_required_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_required_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_request_body** - -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_simple_enum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_request_body.ApiResponseFor200) | success - -#### post_simple_enum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_request_body** - -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_string_type_matches_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_request_body.ApiResponseFor200) | success - -#### post_string_type_matches_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** - -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_request_body** - -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_uniqueitems_false_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_request_body** - -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_uniqueitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_request_body** - -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_uri_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_request_body.ApiResponseFor200) | success - -#### post_uri_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_request_body** - -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_uri_reference_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_request_body.ApiResponseFor200) | success - -#### post_uri_reference_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_request_body** - -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import operation_request_body_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = operation_request_body_api.OperationRequestBodyApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling OperationRequestBodyApi->post_uri_template_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_request_body.ApiResponseFor200) | success - -#### post_uri_template_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PathPostApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PathPostApi.md deleted file mode 100644 index 90c1672f0f9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PathPostApi.md +++ /dev/null @@ -1,11681 +0,0 @@ - -# unit_test_api.apis.tags.path_post_api.PathPostApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_request_body**](#post_additionalproperties_allows_a_schema_which_should_validate_request_body) | **post** /requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody | -[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -[**post_additionalproperties_are_allowed_by_default_request_body**](#post_additionalproperties_are_allowed_by_default_request_body) | **post** /requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody | -[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -[**post_additionalproperties_can_exist_by_itself_request_body**](#post_additionalproperties_can_exist_by_itself_request_body) | **post** /requestBody/postAdditionalpropertiesCanExistByItselfRequestBody | -[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -[**post_additionalproperties_should_not_look_in_applicators_request_body**](#post_additionalproperties_should_not_look_in_applicators_request_body) | **post** /requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody | -[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -[**post_allof_combined_with_anyof_oneof_request_body**](#post_allof_combined_with_anyof_oneof_request_body) | **post** /requestBody/postAllofCombinedWithAnyofOneofRequestBody | -[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -[**post_allof_request_body**](#post_allof_request_body) | **post** /requestBody/postAllofRequestBody | -[**post_allof_response_body_for_content_types**](#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -[**post_allof_simple_types_request_body**](#post_allof_simple_types_request_body) | **post** /requestBody/postAllofSimpleTypesRequestBody | -[**post_allof_simple_types_response_body_for_content_types**](#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -[**post_allof_with_base_schema_request_body**](#post_allof_with_base_schema_request_body) | **post** /requestBody/postAllofWithBaseSchemaRequestBody | -[**post_allof_with_base_schema_response_body_for_content_types**](#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -[**post_allof_with_one_empty_schema_request_body**](#post_allof_with_one_empty_schema_request_body) | **post** /requestBody/postAllofWithOneEmptySchemaRequestBody | -[**post_allof_with_one_empty_schema_response_body_for_content_types**](#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_first_empty_schema_request_body**](#post_allof_with_the_first_empty_schema_request_body) | **post** /requestBody/postAllofWithTheFirstEmptySchemaRequestBody | -[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_last_empty_schema_request_body**](#post_allof_with_the_last_empty_schema_request_body) | **post** /requestBody/postAllofWithTheLastEmptySchemaRequestBody | -[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_two_empty_schemas_request_body**](#post_allof_with_two_empty_schemas_request_body) | **post** /requestBody/postAllofWithTwoEmptySchemasRequestBody | -[**post_allof_with_two_empty_schemas_response_body_for_content_types**](#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -[**post_anyof_complex_types_request_body**](#post_anyof_complex_types_request_body) | **post** /requestBody/postAnyofComplexTypesRequestBody | -[**post_anyof_complex_types_response_body_for_content_types**](#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -[**post_anyof_request_body**](#post_anyof_request_body) | **post** /requestBody/postAnyofRequestBody | -[**post_anyof_response_body_for_content_types**](#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -[**post_anyof_with_base_schema_request_body**](#post_anyof_with_base_schema_request_body) | **post** /requestBody/postAnyofWithBaseSchemaRequestBody | -[**post_anyof_with_base_schema_response_body_for_content_types**](#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -[**post_anyof_with_one_empty_schema_request_body**](#post_anyof_with_one_empty_schema_request_body) | **post** /requestBody/postAnyofWithOneEmptySchemaRequestBody | -[**post_anyof_with_one_empty_schema_response_body_for_content_types**](#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_array_type_matches_arrays_request_body**](#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_array_type_matches_arrays_response_body_for_content_types**](#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -[**post_boolean_type_matches_booleans_request_body**](#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_boolean_type_matches_booleans_response_body_for_content_types**](#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -[**post_by_int_request_body**](#post_by_int_request_body) | **post** /requestBody/postByIntRequestBody | -[**post_by_int_response_body_for_content_types**](#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -[**post_by_number_request_body**](#post_by_number_request_body) | **post** /requestBody/postByNumberRequestBody | -[**post_by_number_response_body_for_content_types**](#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -[**post_by_small_number_request_body**](#post_by_small_number_request_body) | **post** /requestBody/postBySmallNumberRequestBody | -[**post_by_small_number_response_body_for_content_types**](#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -[**post_date_time_format_request_body**](#post_date_time_format_request_body) | **post** /requestBody/postDateTimeFormatRequestBody | -[**post_date_time_format_response_body_for_content_types**](#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -[**post_email_format_request_body**](#post_email_format_request_body) | **post** /requestBody/postEmailFormatRequestBody | -[**post_email_format_response_body_for_content_types**](#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -[**post_enum_with0_does_not_match_false_request_body**](#post_enum_with0_does_not_match_false_request_body) | **post** /requestBody/postEnumWith0DoesNotMatchFalseRequestBody | -[**post_enum_with0_does_not_match_false_response_body_for_content_types**](#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -[**post_enum_with1_does_not_match_true_request_body**](#post_enum_with1_does_not_match_true_request_body) | **post** /requestBody/postEnumWith1DoesNotMatchTrueRequestBody | -[**post_enum_with1_does_not_match_true_response_body_for_content_types**](#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -[**post_enum_with_escaped_characters_request_body**](#post_enum_with_escaped_characters_request_body) | **post** /requestBody/postEnumWithEscapedCharactersRequestBody | -[**post_enum_with_escaped_characters_response_body_for_content_types**](#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -[**post_enum_with_false_does_not_match0_request_body**](#post_enum_with_false_does_not_match0_request_body) | **post** /requestBody/postEnumWithFalseDoesNotMatch0RequestBody | -[**post_enum_with_false_does_not_match0_response_body_for_content_types**](#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -[**post_enum_with_true_does_not_match1_request_body**](#post_enum_with_true_does_not_match1_request_body) | **post** /requestBody/postEnumWithTrueDoesNotMatch1RequestBody | -[**post_enum_with_true_does_not_match1_response_body_for_content_types**](#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -[**post_enums_in_properties_request_body**](#post_enums_in_properties_request_body) | **post** /requestBody/postEnumsInPropertiesRequestBody | -[**post_enums_in_properties_response_body_for_content_types**](#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -[**post_forbidden_property_request_body**](#post_forbidden_property_request_body) | **post** /requestBody/postForbiddenPropertyRequestBody | -[**post_forbidden_property_response_body_for_content_types**](#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -[**post_hostname_format_request_body**](#post_hostname_format_request_body) | **post** /requestBody/postHostnameFormatRequestBody | -[**post_hostname_format_response_body_for_content_types**](#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -[**post_integer_type_matches_integers_request_body**](#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_integer_type_matches_integers_response_body_for_content_types**](#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body) | **post** /requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -[**post_invalid_string_value_for_default_request_body**](#post_invalid_string_value_for_default_request_body) | **post** /requestBody/postInvalidStringValueForDefaultRequestBody | -[**post_invalid_string_value_for_default_response_body_for_content_types**](#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -[**post_ipv4_format_request_body**](#post_ipv4_format_request_body) | **post** /requestBody/postIpv4FormatRequestBody | -[**post_ipv4_format_response_body_for_content_types**](#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -[**post_ipv6_format_request_body**](#post_ipv6_format_request_body) | **post** /requestBody/postIpv6FormatRequestBody | -[**post_ipv6_format_response_body_for_content_types**](#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -[**post_json_pointer_format_request_body**](#post_json_pointer_format_request_body) | **post** /requestBody/postJsonPointerFormatRequestBody | -[**post_json_pointer_format_response_body_for_content_types**](#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -[**post_maximum_validation_request_body**](#post_maximum_validation_request_body) | **post** /requestBody/postMaximumValidationRequestBody | -[**post_maximum_validation_response_body_for_content_types**](#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -[**post_maximum_validation_with_unsigned_integer_request_body**](#post_maximum_validation_with_unsigned_integer_request_body) | **post** /requestBody/postMaximumValidationWithUnsignedIntegerRequestBody | -[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -[**post_maxitems_validation_request_body**](#post_maxitems_validation_request_body) | **post** /requestBody/postMaxitemsValidationRequestBody | -[**post_maxitems_validation_response_body_for_content_types**](#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -[**post_maxlength_validation_request_body**](#post_maxlength_validation_request_body) | **post** /requestBody/postMaxlengthValidationRequestBody | -[**post_maxlength_validation_response_body_for_content_types**](#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -[**post_maxproperties0_means_the_object_is_empty_request_body**](#post_maxproperties0_means_the_object_is_empty_request_body) | **post** /requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody | -[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -[**post_maxproperties_validation_request_body**](#post_maxproperties_validation_request_body) | **post** /requestBody/postMaxpropertiesValidationRequestBody | -[**post_maxproperties_validation_response_body_for_content_types**](#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -[**post_minimum_validation_request_body**](#post_minimum_validation_request_body) | **post** /requestBody/postMinimumValidationRequestBody | -[**post_minimum_validation_response_body_for_content_types**](#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -[**post_minimum_validation_with_signed_integer_request_body**](#post_minimum_validation_with_signed_integer_request_body) | **post** /requestBody/postMinimumValidationWithSignedIntegerRequestBody | -[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -[**post_minitems_validation_request_body**](#post_minitems_validation_request_body) | **post** /requestBody/postMinitemsValidationRequestBody | -[**post_minitems_validation_response_body_for_content_types**](#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -[**post_minlength_validation_request_body**](#post_minlength_validation_request_body) | **post** /requestBody/postMinlengthValidationRequestBody | -[**post_minlength_validation_response_body_for_content_types**](#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -[**post_minproperties_validation_request_body**](#post_minproperties_validation_request_body) | **post** /requestBody/postMinpropertiesValidationRequestBody | -[**post_minproperties_validation_response_body_for_content_types**](#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -[**post_nested_allof_to_check_validation_semantics_request_body**](#post_nested_allof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAllofToCheckValidationSemanticsRequestBody | -[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_anyof_to_check_validation_semantics_request_body**](#post_nested_anyof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody | -[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_items_request_body**](#post_nested_items_request_body) | **post** /requestBody/postNestedItemsRequestBody | -[**post_nested_items_response_body_for_content_types**](#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -[**post_nested_oneof_to_check_validation_semantics_request_body**](#post_nested_oneof_to_check_validation_semantics_request_body) | **post** /requestBody/postNestedOneofToCheckValidationSemanticsRequestBody | -[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_not_more_complex_schema_request_body**](#post_not_more_complex_schema_request_body) | **post** /requestBody/postNotMoreComplexSchemaRequestBody | -[**post_not_more_complex_schema_response_body_for_content_types**](#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -[**post_not_request_body**](#post_not_request_body) | **post** /requestBody/postNotRequestBody | -[**post_not_response_body_for_content_types**](#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -[**post_nul_characters_in_strings_request_body**](#post_nul_characters_in_strings_request_body) | **post** /requestBody/postNulCharactersInStringsRequestBody | -[**post_nul_characters_in_strings_response_body_for_content_types**](#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -[**post_null_type_matches_only_the_null_object_request_body**](#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -[**post_number_type_matches_numbers_request_body**](#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_number_type_matches_numbers_response_body_for_content_types**](#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -[**post_object_properties_validation_request_body**](#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_properties_validation_response_body_for_content_types**](#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -[**post_object_type_matches_objects_request_body**](#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_object_type_matches_objects_response_body_for_content_types**](#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -[**post_oneof_complex_types_request_body**](#post_oneof_complex_types_request_body) | **post** /requestBody/postOneofComplexTypesRequestBody | -[**post_oneof_complex_types_response_body_for_content_types**](#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -[**post_oneof_request_body**](#post_oneof_request_body) | **post** /requestBody/postOneofRequestBody | -[**post_oneof_response_body_for_content_types**](#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -[**post_oneof_with_base_schema_request_body**](#post_oneof_with_base_schema_request_body) | **post** /requestBody/postOneofWithBaseSchemaRequestBody | -[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -[**post_oneof_with_empty_schema_request_body**](#post_oneof_with_empty_schema_request_body) | **post** /requestBody/postOneofWithEmptySchemaRequestBody | -[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -[**post_oneof_with_required_request_body**](#post_oneof_with_required_request_body) | **post** /requestBody/postOneofWithRequiredRequestBody | -[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -[**post_pattern_validation_response_body_for_content_types**](#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -[**post_properties_with_escaped_characters_request_body**](#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_properties_with_escaped_characters_response_body_for_content_types**](#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -[**post_property_named_ref_that_is_not_a_reference_request_body**](#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -[**post_ref_in_additionalproperties_request_body**](#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_additionalproperties_response_body_for_content_types**](#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -[**post_ref_in_allof_request_body**](#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_allof_response_body_for_content_types**](#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -[**post_ref_in_anyof_request_body**](#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_anyof_response_body_for_content_types**](#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -[**post_ref_in_items_request_body**](#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_items_response_body_for_content_types**](#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -[**post_ref_in_not_request_body**](#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -[**post_ref_in_not_response_body_for_content_types**](#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -[**post_ref_in_oneof_request_body**](#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_oneof_response_body_for_content_types**](#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -[**post_ref_in_property_request_body**](#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -[**post_ref_in_property_response_body_for_content_types**](#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -[**post_required_default_validation_request_body**](#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_default_validation_response_body_for_content_types**](#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -[**post_required_validation_request_body**](#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -[**post_simple_enum_validation_request_body**](#post_simple_enum_validation_request_body) | **post** /requestBody/postSimpleEnumValidationRequestBody | -[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_string_type_matches_strings_response_body_for_content_types**](#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body) | **post** /requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -[**post_uniqueitems_false_validation_request_body**](#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_false_validation_response_body_for_content_types**](#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -[**post_uniqueitems_validation_request_body**](#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uniqueitems_validation_response_body_for_content_types**](#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -[**post_uri_format_request_body**](#post_uri_format_request_body) | **post** /requestBody/postUriFormatRequestBody | -[**post_uri_format_response_body_for_content_types**](#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -[**post_uri_reference_format_request_body**](#post_uri_reference_format_request_body) | **post** /requestBody/postUriReferenceFormatRequestBody | -[**post_uri_reference_format_response_body_for_content_types**](#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -[**post_uri_template_format_request_body**](#post_uri_template_format_request_body) | **post** /requestBody/postUriTemplateFormatRequestBody | -[**post_uri_template_format_response_body_for_content_types**](#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | - -# **post_additionalproperties_allows_a_schema_which_should_validate_request_body** - -> post_additionalproperties_allows_a_schema_which_should_validate_request_body(additionalproperties_allows_a_schema_which_should_validate) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAllowsASchemaWhichShouldValidate( - foo=None, - bar=None, - ) - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** - -> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_request_body** - -> post_additionalproperties_are_allowed_by_default_request_body(additionalproperties_are_allowed_by_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesAreAllowedByDefault(None) - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** - -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_request_body** - -> post_additionalproperties_can_exist_by_itself_request_body(additionalproperties_can_exist_by_itself) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesCanExistByItself( - key=True, - ) - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** - -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_request_body** - -> post_additionalproperties_should_not_look_in_applicators_request_body(additionalproperties_should_not_look_in_applicators) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AdditionalpropertiesShouldNotLookInApplicators(None) - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** - -> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_request_body** - -> post_allof_combined_with_anyof_oneof_request_body(allof_combined_with_anyof_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofCombinedWithAnyofOneof(None) - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_combined_with_anyof_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** - -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_request_body** - -> post_allof_request_body(allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = Allof(None) - try: - api_response = api_instance.post_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_request_body.ApiResponseFor200) | success - -#### post_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_response_body_for_content_types** - -> Allof post_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_request_body** - -> post_allof_simple_types_request_body(allof_simple_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofSimpleTypes(None) - try: - api_response = api_instance.post_allof_simple_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_simple_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_request_body.ApiResponseFor200) | success - -#### post_allof_simple_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_response_body_for_content_types** - -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_simple_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_request_body** - -> post_allof_with_base_schema_request_body(allof_with_base_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithBaseSchema({}) - try: - api_response = api_instance.post_allof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_response_body_for_content_types** - -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_request_body** - -> post_allof_with_one_empty_schema_request_body(allof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithOneEmptySchema(None) - try: - api_response = api_instance.post_allof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_response_body_for_content_types** - -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_request_body** - -> post_allof_with_the_first_empty_schema_request_body(allof_with_the_first_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheFirstEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_the_first_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_response_body_for_content_types** - -> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_request_body** - -> post_allof_with_the_last_empty_schema_request_body(allof_with_the_last_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTheLastEmptySchema(None) - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_the_last_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_response_body_for_content_types** - -> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_request_body** - -> post_allof_with_two_empty_schemas_request_body(allof_with_two_empty_schemas) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AllofWithTwoEmptySchemas(None) - try: - api_response = api_instance.post_allof_with_two_empty_schemas_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_two_empty_schemas_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_request_body.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_response_body_for_content_types** - -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_request_body** - -> post_anyof_complex_types_request_body(anyof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofComplexTypes(None) - try: - api_response = api_instance.post_anyof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_request_body.ApiResponseFor200) | success - -#### post_anyof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_response_body_for_content_types** - -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_request_body** - -> post_anyof_request_body(anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = Anyof(None) - try: - api_response = api_instance.post_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_request_body.ApiResponseFor200) | success - -#### post_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_response_body_for_content_types** - -> Anyof post_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_request_body** - -> post_anyof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithBaseSchema("body_example") - try: - api_response = api_instance.post_anyof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_response_body_for_content_types** - -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_request_body** - -> post_anyof_with_one_empty_schema_request_body(anyof_with_one_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = AnyofWithOneEmptySchema(None) - try: - api_response = api_instance.post_anyof_with_one_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_request_body.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_response_body_for_content_types** - -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_request_body** - -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_array_type_matches_arrays_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_request_body.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_response_body_for_content_types** - -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_request_body** - -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_request_body.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_response_body_for_content_types** - -> bool post_boolean_type_matches_booleans_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_request_body** - -> post_by_int_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = ByInt(None) - try: - api_response = api_instance.post_by_int_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_int_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_request_body.ApiResponseFor200) | success - -#### post_by_int_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_response_body_for_content_types** - -> ByInt post_by_int_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_int_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_int_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_int_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_request_body** - -> post_by_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = ByNumber(None) - try: - api_response = api_instance.post_by_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_request_body.ApiResponseFor200) | success - -#### post_by_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_response_body_for_content_types** - -> ByNumber post_by_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_request_body** - -> post_by_small_number_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = BySmallNumber(None) - try: - api_response = api_instance.post_by_small_number_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_small_number_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_request_body.ApiResponseFor200) | success - -#### post_by_small_number_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_response_body_for_content_types** - -> BySmallNumber post_by_small_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_small_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_by_small_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_request_body** - -> post_date_time_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_date_time_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_date_time_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_request_body.ApiResponseFor200) | success - -#### post_date_time_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_date_time_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_date_time_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_request_body** - -> post_email_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_email_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_email_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_request_body.ApiResponseFor200) | success - -#### post_email_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_email_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_email_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_email_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_request_body** - -> post_enum_with0_does_not_match_false_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith0DoesNotMatchFalse(0) - try: - api_response = api_instance.post_enum_with0_does_not_match_false_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_request_body.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_response_body_for_content_types** - -> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_request_body** - -> post_enum_with1_does_not_match_true_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWith1DoesNotMatchTrue(1) - try: - api_response = api_instance.post_enum_with1_does_not_match_true_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_request_body.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_response_body_for_content_types** - -> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_request_body** - -> post_enum_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithEscapedCharacters("foo\nbar") - try: - api_response = api_instance.post_enum_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_response_body_for_content_types** - -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_request_body** - -> post_enum_with_false_does_not_match0_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithFalseDoesNotMatch0(False) - try: - api_response = api_instance.post_enum_with_false_does_not_match0_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_request_body.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_response_body_for_content_types** - -> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_request_body** - -> post_enum_with_true_does_not_match1_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumWithTrueDoesNotMatch1(True) - try: - api_response = api_instance.post_enum_with_true_does_not_match1_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_request_body.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_response_body_for_content_types** - -> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_request_body** - -> post_enums_in_properties_request_body(enums_in_properties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = EnumsInProperties( - foo="foo", - bar="bar", - ) - try: - api_response = api_instance.post_enums_in_properties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enums_in_properties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_request_body.ApiResponseFor200) | success - -#### post_enums_in_properties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_response_body_for_content_types** - -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enums_in_properties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_request_body** - -> post_forbidden_property_request_body(forbidden_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = ForbiddenProperty(None) - try: - api_response = api_instance.post_forbidden_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_forbidden_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_request_body.ApiResponseFor200) | success - -#### post_forbidden_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_response_body_for_content_types** - -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_forbidden_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_request_body** - -> post_hostname_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_hostname_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_hostname_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_request_body.ApiResponseFor200) | success - -#### post_hostname_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_hostname_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_hostname_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_request_body** - -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_integer_type_matches_integers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_request_body.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_response_body_for_content_types** - -> int post_integer_type_matches_integers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body** - -> post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(1) - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** - -> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_request_body** - -> post_invalid_string_value_for_default_request_body(invalid_string_value_for_default) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = InvalidStringValueForDefault(None) - try: - api_response = api_instance.post_invalid_string_value_for_default_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_invalid_string_value_for_default_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_request_body.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_response_body_for_content_types** - -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_request_body** - -> post_ipv4_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv4_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ipv4_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_request_body.ApiResponseFor200) | success - -#### post_ipv4_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv4_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_request_body** - -> post_ipv6_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ipv6_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ipv6_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_request_body.ApiResponseFor200) | success - -#### post_ipv6_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv6_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_request_body** - -> post_json_pointer_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_json_pointer_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_json_pointer_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_request_body.ApiResponseFor200) | success - -#### post_json_pointer_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_json_pointer_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_request_body** - -> post_maximum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidation(None) - try: - api_response = api_instance.post_maximum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maximum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_response_body_for_content_types** - -> MaximumValidation post_maximum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_request_body** - -> post_maximum_validation_with_unsigned_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaximumValidationWithUnsignedInteger(None) - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** - -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_request_body** - -> post_maxitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxitemsValidation(None) - try: - api_response = api_instance.post_maxitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_request_body.ApiResponseFor200) | success - -#### post_maxitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_response_body_for_content_types** - -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_request_body** - -> post_maxlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxlengthValidation(None) - try: - api_response = api_instance.post_maxlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_request_body.ApiResponseFor200) | success - -#### post_maxlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_response_body_for_content_types** - -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_request_body** - -> post_maxproperties0_means_the_object_is_empty_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = Maxproperties0MeansTheObjectIsEmpty(None) - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** - -> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_request_body** - -> post_maxproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MaxpropertiesValidation(None) - try: - api_response = api_instance.post_maxproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_request_body.ApiResponseFor200) | success - -#### post_maxproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_response_body_for_content_types** - -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_request_body** - -> post_minimum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidation(None) - try: - api_response = api_instance.post_minimum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minimum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_response_body_for_content_types** - -> MinimumValidation post_minimum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_request_body** - -> post_minimum_validation_with_signed_integer_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinimumValidationWithSignedInteger(None) - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_response_body_for_content_types** - -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_request_body** - -> post_minitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinitemsValidation(None) - try: - api_response = api_instance.post_minitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_request_body.ApiResponseFor200) | success - -#### post_minitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_response_body_for_content_types** - -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_request_body** - -> post_minlength_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinlengthValidation(None) - try: - api_response = api_instance.post_minlength_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minlength_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_request_body.ApiResponseFor200) | success - -#### post_minlength_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_response_body_for_content_types** - -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_request_body** - -> post_minproperties_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = MinpropertiesValidation(None) - try: - api_response = api_instance.post_minproperties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minproperties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_request_body.ApiResponseFor200) | success - -#### post_minproperties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_response_body_for_content_types** - -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_request_body** - -> post_nested_allof_to_check_validation_semantics_request_body(nested_allof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAllofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_allof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_request_body** - -> post_nested_anyof_to_check_validation_semantics_request_body(nested_anyof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedAnyofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_request_body** - -> post_nested_items_request_body(nested_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedItems([ - [ - [ - [ - 3.14 - ] - ] - ] - ]) - try: - api_response = api_instance.post_nested_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_request_body.ApiResponseFor200) | success - -#### post_nested_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_response_body_for_content_types** - -> NestedItems post_nested_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_request_body** - -> post_nested_oneof_to_check_validation_semantics_request_body(nested_oneof_to_check_validation_semantics) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = NestedOneofToCheckValidationSemantics(None) - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_oneof_to_check_validation_semantics_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** - -> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_request_body** - -> post_not_more_complex_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_more_complex_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_not_more_complex_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_request_body.ApiResponseFor200) | success - -#### post_not_more_complex_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_request_body** - -> post_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_request_body.ApiResponseFor200) | success - -#### post_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_request_body** - -> post_nul_characters_in_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = NulCharactersInStrings("hello\x00there") - try: - api_response = api_instance.post_nul_characters_in_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nul_characters_in_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_request_body.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_response_body_for_content_types** - -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_request_body** - -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_response_body_for_content_types** - -> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_request_body** - -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_number_type_matches_numbers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_request_body.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_response_body_for_content_types** - -> int, float post_number_type_matches_numbers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_request_body** - -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_object_properties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_request_body.ApiResponseFor200) | success - -#### post_object_properties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_response_body_for_content_types** - -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_properties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_request_body** - -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_object_type_matches_objects_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_request_body.ApiResponseFor200) | success - -#### post_object_type_matches_objects_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_response_body_for_content_types** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_request_body** - -> post_oneof_complex_types_request_body(oneof_complex_types) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofComplexTypes(None) - try: - api_response = api_instance.post_oneof_complex_types_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_complex_types_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_request_body.ApiResponseFor200) | success - -#### post_oneof_complex_types_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_response_body_for_content_types** - -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_request_body** - -> post_oneof_request_body(oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = Oneof(None) - try: - api_response = api_instance.post_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_request_body.ApiResponseFor200) | success - -#### post_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_response_body_for_content_types** - -> Oneof post_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_request_body** - -> post_oneof_with_base_schema_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithBaseSchema("body_example") - try: - api_response = api_instance.post_oneof_with_base_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_base_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_response_body_for_content_types** - -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_request_body** - -> post_oneof_with_empty_schema_request_body(oneof_with_empty_schema) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithEmptySchema(None) - try: - api_response = api_instance.post_oneof_with_empty_schema_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_empty_schema_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_request_body.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_response_body_for_content_types** - -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_request_body** - -> post_oneof_with_required_request_body(oneof_with_required) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = OneofWithRequired() - try: - api_response = api_instance.post_oneof_with_required_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_required_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_request_body.ApiResponseFor200) | success - -#### post_oneof_with_required_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_response_body_for_content_types** - -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_required_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_request_body** - -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_pattern_is_not_anchored_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_request_body.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_response_body_for_content_types** - -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_request_body** - -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_pattern_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_request_body.ApiResponseFor200) | success - -#### post_pattern_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_response_body_for_content_types** - -> PatternValidation post_pattern_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_request_body** - -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_properties_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_response_body_for_content_types** - -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_request_body** - -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** - -> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_request_body** - -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_additionalproperties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_request_body.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_response_body_for_content_types** - -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_request_body** - -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_request_body.ApiResponseFor200) | success - -#### post_ref_in_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_response_body_for_content_types** - -> RefInAllof post_ref_in_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_request_body** - -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_request_body.ApiResponseFor200) | success - -#### post_ref_in_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_response_body_for_content_types** - -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_request_body** - -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_request_body.ApiResponseFor200) | success - -#### post_ref_in_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_response_body_for_content_types** - -> RefInItems post_ref_in_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_request_body** - -> post_ref_in_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ref_in_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_request_body.ApiResponseFor200) | success - -#### post_ref_in_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ref_in_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_request_body** - -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_request_body.ApiResponseFor200) | success - -#### post_ref_in_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_response_body_for_content_types** - -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_request_body** - -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_request_body.ApiResponseFor200) | success - -#### post_ref_in_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_response_body_for_content_types** - -> RefInProperty post_ref_in_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_request_body** - -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_default_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_request_body.ApiResponseFor200) | success - -#### post_required_default_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_response_body_for_content_types** - -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_default_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_request_body** - -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_request_body.ApiResponseFor200) | success - -#### post_required_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_response_body_for_content_types** - -> RequiredValidation post_required_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_request_body** - -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_with_empty_array_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_request_body.ApiResponseFor200) | success - -#### post_required_with_empty_array_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_response_body_for_content_types** - -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_request_body** - -> post_required_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_required_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_request_body** - -> post_simple_enum_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = SimpleEnumValidation(1) - try: - api_response = api_instance.post_simple_enum_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_simple_enum_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_request_body.ApiResponseFor200) | success - -#### post_simple_enum_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_response_body_for_content_types** - -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_request_body** - -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_string_type_matches_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_request_body.ApiResponseFor200) | success - -#### post_string_type_matches_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_response_body_for_content_types** - -> str post_string_type_matches_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body** - -> post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body(the_default_keyword_does_not_do_anything_if_the_property_is_missing) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - alpha=5, - ) - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** - -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_request_body** - -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uniqueitems_false_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_response_body_for_content_types** - -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_request_body** - -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uniqueitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_response_body_for_content_types** - -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_request_body** - -> post_uri_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_request_body.ApiResponseFor200) | success - -#### post_uri_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_request_body** - -> post_uri_reference_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_reference_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_reference_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_request_body.ApiResponseFor200) | success - -#### post_uri_reference_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_reference_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_request_body** - -> post_uri_template_format_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_uri_template_format_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_template_format_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_request_body.ApiResponseFor200) | success - -#### post_uri_template_format_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import path_post_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = path_post_api.PathPostApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_template_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PathPostApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PatternApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PatternApi.md deleted file mode 100644 index 0497da27ae1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PatternApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.pattern_api.PatternApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_pattern_is_not_anchored_request_body**](#post_pattern_is_not_anchored_request_body) | **post** /requestBody/postPatternIsNotAnchoredRequestBody | -[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -[**post_pattern_validation_request_body**](#post_pattern_validation_request_body) | **post** /requestBody/postPatternValidationRequestBody | -[**post_pattern_validation_response_body_for_content_types**](#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | - -# **post_pattern_is_not_anchored_request_body** - -> post_pattern_is_not_anchored_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import pattern_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pattern_api.PatternApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternIsNotAnchored(None) - try: - api_response = api_instance.post_pattern_is_not_anchored_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PatternApi->post_pattern_is_not_anchored_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_request_body.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_response_body_for_content_types** - -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import pattern_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pattern_api.PatternApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PatternApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_request_body** - -> post_pattern_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import pattern_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pattern_api.PatternApi(api_client) - - # example passing only required values which don't have defaults set - body = PatternValidation(None) - try: - api_response = api_instance.post_pattern_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PatternApi->post_pattern_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_request_body.ApiResponseFor200) | success - -#### post_pattern_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_response_body_for_content_types** - -> PatternValidation post_pattern_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import pattern_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pattern_api.PatternApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PatternApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PropertiesApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PropertiesApi.md deleted file mode 100644 index dfa7d442778..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/PropertiesApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.properties_api.PropertiesApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_object_properties_validation_request_body**](#post_object_properties_validation_request_body) | **post** /requestBody/postObjectPropertiesValidationRequestBody | -[**post_object_properties_validation_response_body_for_content_types**](#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -[**post_properties_with_escaped_characters_request_body**](#post_properties_with_escaped_characters_request_body) | **post** /requestBody/postPropertiesWithEscapedCharactersRequestBody | -[**post_properties_with_escaped_characters_response_body_for_content_types**](#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | - -# **post_object_properties_validation_request_body** - -> post_object_properties_validation_request_body(object_properties_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import properties_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = properties_api.PropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = ObjectPropertiesValidation(None) - try: - api_response = api_instance.post_object_properties_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PropertiesApi->post_object_properties_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_request_body.ApiResponseFor200) | success - -#### post_object_properties_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_response_body_for_content_types** - -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import properties_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = properties_api.PropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_properties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PropertiesApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_request_body** - -> post_properties_with_escaped_characters_request_body(properties_with_escaped_characters) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import properties_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = properties_api.PropertiesApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertiesWithEscapedCharacters(None) - try: - api_response = api_instance.post_properties_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling PropertiesApi->post_properties_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_response_body_for_content_types** - -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import properties_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = properties_api.PropertiesApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling PropertiesApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RefApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RefApi.md deleted file mode 100644 index b947696036b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RefApi.md +++ /dev/null @@ -1,1090 +0,0 @@ - -# unit_test_api.apis.tags.ref_api.RefApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_property_named_ref_that_is_not_a_reference_request_body**](#post_property_named_ref_that_is_not_a_reference_request_body) | **post** /requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody | -[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -[**post_ref_in_additionalproperties_request_body**](#post_ref_in_additionalproperties_request_body) | **post** /requestBody/postRefInAdditionalpropertiesRequestBody | -[**post_ref_in_additionalproperties_response_body_for_content_types**](#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -[**post_ref_in_allof_request_body**](#post_ref_in_allof_request_body) | **post** /requestBody/postRefInAllofRequestBody | -[**post_ref_in_allof_response_body_for_content_types**](#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -[**post_ref_in_anyof_request_body**](#post_ref_in_anyof_request_body) | **post** /requestBody/postRefInAnyofRequestBody | -[**post_ref_in_anyof_response_body_for_content_types**](#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -[**post_ref_in_items_request_body**](#post_ref_in_items_request_body) | **post** /requestBody/postRefInItemsRequestBody | -[**post_ref_in_items_response_body_for_content_types**](#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -[**post_ref_in_not_request_body**](#post_ref_in_not_request_body) | **post** /requestBody/postRefInNotRequestBody | -[**post_ref_in_not_response_body_for_content_types**](#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -[**post_ref_in_oneof_request_body**](#post_ref_in_oneof_request_body) | **post** /requestBody/postRefInOneofRequestBody | -[**post_ref_in_oneof_response_body_for_content_types**](#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -[**post_ref_in_property_request_body**](#post_ref_in_property_request_body) | **post** /requestBody/postRefInPropertyRequestBody | -[**post_ref_in_property_response_body_for_content_types**](#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | - -# **post_property_named_ref_that_is_not_a_reference_request_body** - -> post_property_named_ref_that_is_not_a_reference_request_body(property_named_ref_that_is_not_a_reference) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = PropertyNamedRefThatIsNotAReference(None) - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_property_named_ref_that_is_not_a_reference_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** - -> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_request_body** - -> post_ref_in_additionalproperties_request_body(ref_in_additionalproperties) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAdditionalproperties( - key=PropertyNamedRefThatIsNotAReference(None), - ) - try: - api_response = api_instance.post_ref_in_additionalproperties_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_additionalproperties_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_request_body.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_response_body_for_content_types** - -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_request_body** - -> post_ref_in_allof_request_body(ref_in_allof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAllof(None) - try: - api_response = api_instance.post_ref_in_allof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_allof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_request_body.ApiResponseFor200) | success - -#### post_ref_in_allof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_response_body_for_content_types** - -> RefInAllof post_ref_in_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_request_body** - -> post_ref_in_anyof_request_body(ref_in_anyof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInAnyof(None) - try: - api_response = api_instance.post_ref_in_anyof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_anyof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_request_body.ApiResponseFor200) | success - -#### post_ref_in_anyof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_response_body_for_content_types** - -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_request_body** - -> post_ref_in_items_request_body(ref_in_items) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInItems([ - PropertyNamedRefThatIsNotAReference(None) - ]) - try: - api_response = api_instance.post_ref_in_items_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_items_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_request_body.ApiResponseFor200) | success - -#### post_ref_in_items_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_response_body_for_content_types** - -> RefInItems post_ref_in_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_request_body** - -> post_ref_in_not_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_ref_in_not_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_not_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_request_body.ApiResponseFor200) | success - -#### post_ref_in_not_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ref_in_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_request_body** - -> post_ref_in_oneof_request_body(ref_in_oneof) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInOneof(None) - try: - api_response = api_instance.post_ref_in_oneof_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_oneof_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_request_body.ApiResponseFor200) | success - -#### post_ref_in_oneof_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_response_body_for_content_types** - -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_request_body** - -> post_ref_in_property_request_body(ref_in_property) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example passing only required values which don't have defaults set - body = RefInProperty(None) - try: - api_response = api_instance.post_ref_in_property_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_property_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_request_body.ApiResponseFor200) | success - -#### post_ref_in_property_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_response_body_for_content_types** - -> RefInProperty post_ref_in_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import ref_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = ref_api.RefApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RefApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RequiredApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RequiredApi.md deleted file mode 100644 index 208bb0f7c5e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/RequiredApi.md +++ /dev/null @@ -1,540 +0,0 @@ - -# unit_test_api.apis.tags.required_api.RequiredApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_required_default_validation_request_body**](#post_required_default_validation_request_body) | **post** /requestBody/postRequiredDefaultValidationRequestBody | -[**post_required_default_validation_response_body_for_content_types**](#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -[**post_required_validation_request_body**](#post_required_validation_request_body) | **post** /requestBody/postRequiredValidationRequestBody | -[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -[**post_required_with_empty_array_request_body**](#post_required_with_empty_array_request_body) | **post** /requestBody/postRequiredWithEmptyArrayRequestBody | -[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -[**post_required_with_escaped_characters_request_body**](#post_required_with_escaped_characters_request_body) | **post** /requestBody/postRequiredWithEscapedCharactersRequestBody | -[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | - -# **post_required_default_validation_request_body** - -> post_required_default_validation_request_body(required_default_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredDefaultValidation(None) - try: - api_response = api_instance.post_required_default_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_default_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_request_body.ApiResponseFor200) | success - -#### post_required_default_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_response_body_for_content_types** - -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_default_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_request_body** - -> post_required_validation_request_body(required_validation) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredValidation(None) - try: - api_response = api_instance.post_required_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_request_body.ApiResponseFor200) | success - -#### post_required_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_response_body_for_content_types** - -> RequiredValidation post_required_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_request_body** - -> post_required_with_empty_array_request_body(required_with_empty_array) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example passing only required values which don't have defaults set - body = RequiredWithEmptyArray(None) - try: - api_response = api_instance.post_required_with_empty_array_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_with_empty_array_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_request_body.ApiResponseFor200) | success - -#### post_required_with_empty_array_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_response_body_for_content_types** - -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_request_body** - -> post_required_with_escaped_characters_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_required_with_escaped_characters_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_with_escaped_characters_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_request_body.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import required_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = required_api.RequiredApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling RequiredApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ResponseContentContentTypeSchemaApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ResponseContentContentTypeSchemaApi.md deleted file mode 100644 index dc828e29528..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/ResponseContentContentTypeSchemaApi.md +++ /dev/null @@ -1,5354 +0,0 @@ - -# unit_test_api.apis.tags.response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types**](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes | -[**post_additionalproperties_are_allowed_by_default_response_body_for_content_types**](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes | -[**post_additionalproperties_can_exist_by_itself_response_body_for_content_types**](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes | -[**post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types**](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types) | **post** /responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes | -[**post_allof_combined_with_anyof_oneof_response_body_for_content_types**](#post_allof_combined_with_anyof_oneof_response_body_for_content_types) | **post** /responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes | -[**post_allof_response_body_for_content_types**](#post_allof_response_body_for_content_types) | **post** /responseBody/postAllofResponseBodyForContentTypes | -[**post_allof_simple_types_response_body_for_content_types**](#post_allof_simple_types_response_body_for_content_types) | **post** /responseBody/postAllofSimpleTypesResponseBodyForContentTypes | -[**post_allof_with_base_schema_response_body_for_content_types**](#post_allof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes | -[**post_allof_with_one_empty_schema_response_body_for_content_types**](#post_allof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_first_empty_schema_response_body_for_content_types**](#post_allof_with_the_first_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_the_last_empty_schema_response_body_for_content_types**](#post_allof_with_the_last_empty_schema_response_body_for_content_types) | **post** /responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes | -[**post_allof_with_two_empty_schemas_response_body_for_content_types**](#post_allof_with_two_empty_schemas_response_body_for_content_types) | **post** /responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes | -[**post_anyof_complex_types_response_body_for_content_types**](#post_anyof_complex_types_response_body_for_content_types) | **post** /responseBody/postAnyofComplexTypesResponseBodyForContentTypes | -[**post_anyof_response_body_for_content_types**](#post_anyof_response_body_for_content_types) | **post** /responseBody/postAnyofResponseBodyForContentTypes | -[**post_anyof_with_base_schema_response_body_for_content_types**](#post_anyof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes | -[**post_anyof_with_one_empty_schema_response_body_for_content_types**](#post_anyof_with_one_empty_schema_response_body_for_content_types) | **post** /responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes | -[**post_array_type_matches_arrays_response_body_for_content_types**](#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -[**post_boolean_type_matches_booleans_response_body_for_content_types**](#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -[**post_by_int_response_body_for_content_types**](#post_by_int_response_body_for_content_types) | **post** /responseBody/postByIntResponseBodyForContentTypes | -[**post_by_number_response_body_for_content_types**](#post_by_number_response_body_for_content_types) | **post** /responseBody/postByNumberResponseBodyForContentTypes | -[**post_by_small_number_response_body_for_content_types**](#post_by_small_number_response_body_for_content_types) | **post** /responseBody/postBySmallNumberResponseBodyForContentTypes | -[**post_date_time_format_response_body_for_content_types**](#post_date_time_format_response_body_for_content_types) | **post** /responseBody/postDateTimeFormatResponseBodyForContentTypes | -[**post_email_format_response_body_for_content_types**](#post_email_format_response_body_for_content_types) | **post** /responseBody/postEmailFormatResponseBodyForContentTypes | -[**post_enum_with0_does_not_match_false_response_body_for_content_types**](#post_enum_with0_does_not_match_false_response_body_for_content_types) | **post** /responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes | -[**post_enum_with1_does_not_match_true_response_body_for_content_types**](#post_enum_with1_does_not_match_true_response_body_for_content_types) | **post** /responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes | -[**post_enum_with_escaped_characters_response_body_for_content_types**](#post_enum_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes | -[**post_enum_with_false_does_not_match0_response_body_for_content_types**](#post_enum_with_false_does_not_match0_response_body_for_content_types) | **post** /responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes | -[**post_enum_with_true_does_not_match1_response_body_for_content_types**](#post_enum_with_true_does_not_match1_response_body_for_content_types) | **post** /responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes | -[**post_enums_in_properties_response_body_for_content_types**](#post_enums_in_properties_response_body_for_content_types) | **post** /responseBody/postEnumsInPropertiesResponseBodyForContentTypes | -[**post_forbidden_property_response_body_for_content_types**](#post_forbidden_property_response_body_for_content_types) | **post** /responseBody/postForbiddenPropertyResponseBodyForContentTypes | -[**post_hostname_format_response_body_for_content_types**](#post_hostname_format_response_body_for_content_types) | **post** /responseBody/postHostnameFormatResponseBodyForContentTypes | -[**post_integer_type_matches_integers_response_body_for_content_types**](#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -[**post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types**](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types) | **post** /responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes | -[**post_invalid_string_value_for_default_response_body_for_content_types**](#post_invalid_string_value_for_default_response_body_for_content_types) | **post** /responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes | -[**post_ipv4_format_response_body_for_content_types**](#post_ipv4_format_response_body_for_content_types) | **post** /responseBody/postIpv4FormatResponseBodyForContentTypes | -[**post_ipv6_format_response_body_for_content_types**](#post_ipv6_format_response_body_for_content_types) | **post** /responseBody/postIpv6FormatResponseBodyForContentTypes | -[**post_json_pointer_format_response_body_for_content_types**](#post_json_pointer_format_response_body_for_content_types) | **post** /responseBody/postJsonPointerFormatResponseBodyForContentTypes | -[**post_maximum_validation_response_body_for_content_types**](#post_maximum_validation_response_body_for_content_types) | **post** /responseBody/postMaximumValidationResponseBodyForContentTypes | -[**post_maximum_validation_with_unsigned_integer_response_body_for_content_types**](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types) | **post** /responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes | -[**post_maxitems_validation_response_body_for_content_types**](#post_maxitems_validation_response_body_for_content_types) | **post** /responseBody/postMaxitemsValidationResponseBodyForContentTypes | -[**post_maxlength_validation_response_body_for_content_types**](#post_maxlength_validation_response_body_for_content_types) | **post** /responseBody/postMaxlengthValidationResponseBodyForContentTypes | -[**post_maxproperties0_means_the_object_is_empty_response_body_for_content_types**](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types) | **post** /responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes | -[**post_maxproperties_validation_response_body_for_content_types**](#post_maxproperties_validation_response_body_for_content_types) | **post** /responseBody/postMaxpropertiesValidationResponseBodyForContentTypes | -[**post_minimum_validation_response_body_for_content_types**](#post_minimum_validation_response_body_for_content_types) | **post** /responseBody/postMinimumValidationResponseBodyForContentTypes | -[**post_minimum_validation_with_signed_integer_response_body_for_content_types**](#post_minimum_validation_with_signed_integer_response_body_for_content_types) | **post** /responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes | -[**post_minitems_validation_response_body_for_content_types**](#post_minitems_validation_response_body_for_content_types) | **post** /responseBody/postMinitemsValidationResponseBodyForContentTypes | -[**post_minlength_validation_response_body_for_content_types**](#post_minlength_validation_response_body_for_content_types) | **post** /responseBody/postMinlengthValidationResponseBodyForContentTypes | -[**post_minproperties_validation_response_body_for_content_types**](#post_minproperties_validation_response_body_for_content_types) | **post** /responseBody/postMinpropertiesValidationResponseBodyForContentTypes | -[**post_nested_allof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_anyof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_nested_items_response_body_for_content_types**](#post_nested_items_response_body_for_content_types) | **post** /responseBody/postNestedItemsResponseBodyForContentTypes | -[**post_nested_oneof_to_check_validation_semantics_response_body_for_content_types**](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types) | **post** /responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes | -[**post_not_more_complex_schema_response_body_for_content_types**](#post_not_more_complex_schema_response_body_for_content_types) | **post** /responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes | -[**post_not_response_body_for_content_types**](#post_not_response_body_for_content_types) | **post** /responseBody/postNotResponseBodyForContentTypes | -[**post_nul_characters_in_strings_response_body_for_content_types**](#post_nul_characters_in_strings_response_body_for_content_types) | **post** /responseBody/postNulCharactersInStringsResponseBodyForContentTypes | -[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -[**post_number_type_matches_numbers_response_body_for_content_types**](#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -[**post_object_properties_validation_response_body_for_content_types**](#post_object_properties_validation_response_body_for_content_types) | **post** /responseBody/postObjectPropertiesValidationResponseBodyForContentTypes | -[**post_object_type_matches_objects_response_body_for_content_types**](#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -[**post_oneof_complex_types_response_body_for_content_types**](#post_oneof_complex_types_response_body_for_content_types) | **post** /responseBody/postOneofComplexTypesResponseBodyForContentTypes | -[**post_oneof_response_body_for_content_types**](#post_oneof_response_body_for_content_types) | **post** /responseBody/postOneofResponseBodyForContentTypes | -[**post_oneof_with_base_schema_response_body_for_content_types**](#post_oneof_with_base_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes | -[**post_oneof_with_empty_schema_response_body_for_content_types**](#post_oneof_with_empty_schema_response_body_for_content_types) | **post** /responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes | -[**post_oneof_with_required_response_body_for_content_types**](#post_oneof_with_required_response_body_for_content_types) | **post** /responseBody/postOneofWithRequiredResponseBodyForContentTypes | -[**post_pattern_is_not_anchored_response_body_for_content_types**](#post_pattern_is_not_anchored_response_body_for_content_types) | **post** /responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes | -[**post_pattern_validation_response_body_for_content_types**](#post_pattern_validation_response_body_for_content_types) | **post** /responseBody/postPatternValidationResponseBodyForContentTypes | -[**post_properties_with_escaped_characters_response_body_for_content_types**](#post_properties_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes | -[**post_property_named_ref_that_is_not_a_reference_response_body_for_content_types**](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types) | **post** /responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes | -[**post_ref_in_additionalproperties_response_body_for_content_types**](#post_ref_in_additionalproperties_response_body_for_content_types) | **post** /responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes | -[**post_ref_in_allof_response_body_for_content_types**](#post_ref_in_allof_response_body_for_content_types) | **post** /responseBody/postRefInAllofResponseBodyForContentTypes | -[**post_ref_in_anyof_response_body_for_content_types**](#post_ref_in_anyof_response_body_for_content_types) | **post** /responseBody/postRefInAnyofResponseBodyForContentTypes | -[**post_ref_in_items_response_body_for_content_types**](#post_ref_in_items_response_body_for_content_types) | **post** /responseBody/postRefInItemsResponseBodyForContentTypes | -[**post_ref_in_not_response_body_for_content_types**](#post_ref_in_not_response_body_for_content_types) | **post** /responseBody/postRefInNotResponseBodyForContentTypes | -[**post_ref_in_oneof_response_body_for_content_types**](#post_ref_in_oneof_response_body_for_content_types) | **post** /responseBody/postRefInOneofResponseBodyForContentTypes | -[**post_ref_in_property_response_body_for_content_types**](#post_ref_in_property_response_body_for_content_types) | **post** /responseBody/postRefInPropertyResponseBodyForContentTypes | -[**post_required_default_validation_response_body_for_content_types**](#post_required_default_validation_response_body_for_content_types) | **post** /responseBody/postRequiredDefaultValidationResponseBodyForContentTypes | -[**post_required_validation_response_body_for_content_types**](#post_required_validation_response_body_for_content_types) | **post** /responseBody/postRequiredValidationResponseBodyForContentTypes | -[**post_required_with_empty_array_response_body_for_content_types**](#post_required_with_empty_array_response_body_for_content_types) | **post** /responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes | -[**post_required_with_escaped_characters_response_body_for_content_types**](#post_required_with_escaped_characters_response_body_for_content_types) | **post** /responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes | -[**post_simple_enum_validation_response_body_for_content_types**](#post_simple_enum_validation_response_body_for_content_types) | **post** /responseBody/postSimpleEnumValidationResponseBodyForContentTypes | -[**post_string_type_matches_strings_response_body_for_content_types**](#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | -[**post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types**](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types) | **post** /responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes | -[**post_uniqueitems_false_validation_response_body_for_content_types**](#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -[**post_uniqueitems_validation_response_body_for_content_types**](#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | -[**post_uri_format_response_body_for_content_types**](#post_uri_format_response_body_for_content_types) | **post** /responseBody/postUriFormatResponseBodyForContentTypes | -[**post_uri_reference_format_response_body_for_content_types**](#post_uri_reference_format_response_body_for_content_types) | **post** /responseBody/postUriReferenceFormatResponseBodyForContentTypes | -[**post_uri_template_format_response_body_for_content_types**](#post_uri_template_format_response_body_for_content_types) | **post** /responseBody/postUriTemplateFormatResponseBodyForContentTypes | - -# **post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types** - -> AdditionalpropertiesAllowsASchemaWhichShouldValidate post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAllowsASchemaWhichShouldValidate**](../../models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_are_allowed_by_default_response_body_for_content_types** - -> AdditionalpropertiesAreAllowedByDefault post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_are_allowed_by_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_are_allowed_by_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_are_allowed_by_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesAreAllowedByDefault**](../../models/AdditionalpropertiesAreAllowedByDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_can_exist_by_itself_response_body_for_content_types** - -> AdditionalpropertiesCanExistByItself post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_can_exist_by_itself_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_can_exist_by_itself_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_can_exist_by_itself_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesCanExistByItself**](../../models/AdditionalpropertiesCanExistByItself.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types** - -> AdditionalpropertiesShouldNotLookInApplicators post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200) | success - -#### post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalpropertiesShouldNotLookInApplicators**](../../models/AdditionalpropertiesShouldNotLookInApplicators.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_combined_with_anyof_oneof_response_body_for_content_types** - -> AllofCombinedWithAnyofOneof post_allof_combined_with_anyof_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_combined_with_anyof_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_combined_with_anyof_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_combined_with_anyof_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofCombinedWithAnyofOneof**](../../models/AllofCombinedWithAnyofOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_response_body_for_content_types** - -> Allof post_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof import Allof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Allof**](../../models/Allof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_simple_types_response_body_for_content_types** - -> AllofSimpleTypes post_allof_simple_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_simple_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_simple_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_simple_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_simple_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofSimpleTypes**](../../models/AllofSimpleTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_base_schema_response_body_for_content_types** - -> AllofWithBaseSchema post_allof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithBaseSchema**](../../models/AllofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_one_empty_schema_response_body_for_content_types** - -> AllofWithOneEmptySchema post_allof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithOneEmptySchema**](../../models/AllofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_first_empty_schema_response_body_for_content_types** - -> AllofWithTheFirstEmptySchema post_allof_with_the_first_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_first_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_the_first_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_first_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheFirstEmptySchema**](../../models/AllofWithTheFirstEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_the_last_empty_schema_response_body_for_content_types** - -> AllofWithTheLastEmptySchema post_allof_with_the_last_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_the_last_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_the_last_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_the_last_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTheLastEmptySchema**](../../models/AllofWithTheLastEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_allof_with_two_empty_schemas_response_body_for_content_types** - -> AllofWithTwoEmptySchemas post_allof_with_two_empty_schemas_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_allof_with_two_empty_schemas_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_allof_with_two_empty_schemas_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200) | success - -#### post_allof_with_two_empty_schemas_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AllofWithTwoEmptySchemas**](../../models/AllofWithTwoEmptySchemas.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_complex_types_response_body_for_content_types** - -> AnyofComplexTypes post_anyof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofComplexTypes**](../../models/AnyofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_response_body_for_content_types** - -> Anyof post_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.anyof import Anyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Anyof**](../../models/Anyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_base_schema_response_body_for_content_types** - -> AnyofWithBaseSchema post_anyof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithBaseSchema**](../../models/AnyofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_anyof_with_one_empty_schema_response_body_for_content_types** - -> AnyofWithOneEmptySchema post_anyof_with_one_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_anyof_with_one_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_anyof_with_one_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_anyof_with_one_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnyofWithOneEmptySchema**](../../models/AnyofWithOneEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_response_body_for_content_types** - -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_response_body_for_content_types** - -> bool post_boolean_type_matches_booleans_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_int_response_body_for_content_types** - -> ByInt post_by_int_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.by_int import ByInt -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_int_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_int_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_int_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_int_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByInt**](../../models/ByInt.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_number_response_body_for_content_types** - -> ByNumber post_by_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.by_number import ByNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ByNumber**](../../models/ByNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_by_small_number_response_body_for_content_types** - -> BySmallNumber post_by_small_number_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.by_small_number import BySmallNumber -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_by_small_number_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_by_small_number_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_by_small_number_response_body_for_content_types.ApiResponseFor200) | success - -#### post_by_small_number_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**BySmallNumber**](../../models/BySmallNumber.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_date_time_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_date_time_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_date_time_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_date_time_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_date_time_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_date_time_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_email_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_email_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_email_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_email_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_email_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_email_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with0_does_not_match_false_response_body_for_content_types** - -> EnumWith0DoesNotMatchFalse post_enum_with0_does_not_match_false_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with0_does_not_match_false_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with0_does_not_match_false_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with0_does_not_match_false_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith0DoesNotMatchFalse**](../../models/EnumWith0DoesNotMatchFalse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with1_does_not_match_true_response_body_for_content_types** - -> EnumWith1DoesNotMatchTrue post_enum_with1_does_not_match_true_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with1_does_not_match_true_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with1_does_not_match_true_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with1_does_not_match_true_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWith1DoesNotMatchTrue**](../../models/EnumWith1DoesNotMatchTrue.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_escaped_characters_response_body_for_content_types** - -> EnumWithEscapedCharacters post_enum_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithEscapedCharacters**](../../models/EnumWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_false_does_not_match0_response_body_for_content_types** - -> EnumWithFalseDoesNotMatch0 post_enum_with_false_does_not_match0_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_false_does_not_match0_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_false_does_not_match0_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_false_does_not_match0_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithFalseDoesNotMatch0**](../../models/EnumWithFalseDoesNotMatch0.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enum_with_true_does_not_match1_response_body_for_content_types** - -> EnumWithTrueDoesNotMatch1 post_enum_with_true_does_not_match1_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enum_with_true_does_not_match1_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enum_with_true_does_not_match1_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enum_with_true_does_not_match1_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumWithTrueDoesNotMatch1**](../../models/EnumWithTrueDoesNotMatch1.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_enums_in_properties_response_body_for_content_types** - -> EnumsInProperties post_enums_in_properties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_enums_in_properties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_enums_in_properties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_enums_in_properties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_enums_in_properties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**EnumsInProperties**](../../models/EnumsInProperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_forbidden_property_response_body_for_content_types** - -> ForbiddenProperty post_forbidden_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_forbidden_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_forbidden_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_forbidden_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_forbidden_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ForbiddenProperty**](../../models/ForbiddenProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_hostname_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_hostname_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_hostname_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_hostname_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_hostname_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_hostname_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_response_body_for_content_types** - -> int post_integer_type_matches_integers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types** - -> InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf**](../../models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_invalid_string_value_for_default_response_body_for_content_types** - -> InvalidStringValueForDefault post_invalid_string_value_for_default_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_invalid_string_value_for_default_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_invalid_string_value_for_default_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200) | success - -#### post_invalid_string_value_for_default_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**InvalidStringValueForDefault**](../../models/InvalidStringValueForDefault.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv4_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv4_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv4_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ipv4_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv4_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv4_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ipv6_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ipv6_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ipv6_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ipv6_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ipv6_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ipv6_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_json_pointer_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_json_pointer_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_json_pointer_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_json_pointer_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_json_pointer_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_json_pointer_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_response_body_for_content_types** - -> MaximumValidation post_maximum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maximum_validation import MaximumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maximum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidation**](../../models/MaximumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maximum_validation_with_unsigned_integer_response_body_for_content_types** - -> MaximumValidationWithUnsignedInteger post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maximum_validation_with_unsigned_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maximum_validation_with_unsigned_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maximum_validation_with_unsigned_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaximumValidationWithUnsignedInteger**](../../models/MaximumValidationWithUnsignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxitems_validation_response_body_for_content_types** - -> MaxitemsValidation post_maxitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxitemsValidation**](../../models/MaxitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxlength_validation_response_body_for_content_types** - -> MaxlengthValidation post_maxlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxlengthValidation**](../../models/MaxlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties0_means_the_object_is_empty_response_body_for_content_types** - -> Maxproperties0MeansTheObjectIsEmpty post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties0_means_the_object_is_empty_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxproperties0_means_the_object_is_empty_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Maxproperties0MeansTheObjectIsEmpty**](../../models/Maxproperties0MeansTheObjectIsEmpty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_maxproperties_validation_response_body_for_content_types** - -> MaxpropertiesValidation post_maxproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_maxproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_maxproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_maxproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MaxpropertiesValidation**](../../models/MaxpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_response_body_for_content_types** - -> MinimumValidation post_minimum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.minimum_validation import MinimumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_minimum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidation**](../../models/MinimumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minimum_validation_with_signed_integer_response_body_for_content_types** - -> MinimumValidationWithSignedInteger post_minimum_validation_with_signed_integer_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minimum_validation_with_signed_integer_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_minimum_validation_with_signed_integer_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minimum_validation_with_signed_integer_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinimumValidationWithSignedInteger**](../../models/MinimumValidationWithSignedInteger.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minitems_validation_response_body_for_content_types** - -> MinitemsValidation post_minitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_minitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinitemsValidation**](../../models/MinitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minlength_validation_response_body_for_content_types** - -> MinlengthValidation post_minlength_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minlength_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_minlength_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minlength_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minlength_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinlengthValidation**](../../models/MinlengthValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_minproperties_validation_response_body_for_content_types** - -> MinpropertiesValidation post_minproperties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_minproperties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_minproperties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_minproperties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_minproperties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**MinpropertiesValidation**](../../models/MinpropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_allof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAllofToCheckValidationSemantics post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_allof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_allof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_allof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAllofToCheckValidationSemantics**](../../models/NestedAllofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_anyof_to_check_validation_semantics_response_body_for_content_types** - -> NestedAnyofToCheckValidationSemantics post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_anyof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_anyof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedAnyofToCheckValidationSemantics**](../../models/NestedAnyofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_items_response_body_for_content_types** - -> NestedItems post_nested_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.nested_items import NestedItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedItems**](../../models/NestedItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nested_oneof_to_check_validation_semantics_response_body_for_content_types** - -> NestedOneofToCheckValidationSemantics post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nested_oneof_to_check_validation_semantics_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_nested_oneof_to_check_validation_semantics_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NestedOneofToCheckValidationSemantics**](../../models/NestedOneofToCheckValidationSemantics.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_more_complex_schema_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_more_complex_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_more_complex_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_not_more_complex_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_more_complex_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_nul_characters_in_strings_response_body_for_content_types** - -> NulCharactersInStrings post_nul_characters_in_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_nul_characters_in_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_nul_characters_in_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_nul_characters_in_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NulCharactersInStrings**](../../models/NulCharactersInStrings.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_response_body_for_content_types** - -> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_response_body_for_content_types** - -> int, float post_number_type_matches_numbers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_properties_validation_response_body_for_content_types** - -> ObjectPropertiesValidation post_object_properties_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_properties_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_object_properties_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_properties_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_properties_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectPropertiesValidation**](../../models/ObjectPropertiesValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_response_body_for_content_types** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_complex_types_response_body_for_content_types** - -> OneofComplexTypes post_oneof_complex_types_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_complex_types_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_complex_types_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_complex_types_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofComplexTypes**](../../models/OneofComplexTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_response_body_for_content_types** - -> Oneof post_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.oneof import Oneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Oneof**](../../models/Oneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_base_schema_response_body_for_content_types** - -> OneofWithBaseSchema post_oneof_with_base_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_base_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_base_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_base_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithBaseSchema**](../../models/OneofWithBaseSchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_empty_schema_response_body_for_content_types** - -> OneofWithEmptySchema post_oneof_with_empty_schema_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_empty_schema_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_empty_schema_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_empty_schema_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithEmptySchema**](../../models/OneofWithEmptySchema.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_oneof_with_required_response_body_for_content_types** - -> OneofWithRequired post_oneof_with_required_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_oneof_with_required_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_oneof_with_required_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_oneof_with_required_response_body_for_content_types.ApiResponseFor200) | success - -#### post_oneof_with_required_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OneofWithRequired**](../../models/OneofWithRequired.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_is_not_anchored_response_body_for_content_types** - -> PatternIsNotAnchored post_pattern_is_not_anchored_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_is_not_anchored_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_pattern_is_not_anchored_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_is_not_anchored_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternIsNotAnchored**](../../models/PatternIsNotAnchored.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_pattern_validation_response_body_for_content_types** - -> PatternValidation post_pattern_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.pattern_validation import PatternValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_pattern_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_pattern_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_pattern_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_pattern_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PatternValidation**](../../models/PatternValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_properties_with_escaped_characters_response_body_for_content_types** - -> PropertiesWithEscapedCharacters post_properties_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_properties_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_properties_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_properties_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertiesWithEscapedCharacters**](../../models/PropertiesWithEscapedCharacters.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_property_named_ref_that_is_not_a_reference_response_body_for_content_types** - -> PropertyNamedRefThatIsNotAReference post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_property_named_ref_that_is_not_a_reference_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_property_named_ref_that_is_not_a_reference_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200) | success - -#### post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](../../models/PropertyNamedRefThatIsNotAReference.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_additionalproperties_response_body_for_content_types** - -> RefInAdditionalproperties post_ref_in_additionalproperties_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_additionalproperties_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_additionalproperties_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_additionalproperties_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAdditionalproperties**](../../models/RefInAdditionalproperties.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_allof_response_body_for_content_types** - -> RefInAllof post_ref_in_allof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_allof import RefInAllof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_allof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_allof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_allof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_allof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAllof**](../../models/RefInAllof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_anyof_response_body_for_content_types** - -> RefInAnyof post_ref_in_anyof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_anyof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_anyof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_anyof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInAnyof**](../../models/RefInAnyof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_items_response_body_for_content_types** - -> RefInItems post_ref_in_items_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_items import RefInItems -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_items_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_items_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_items_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_items_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInItems**](../../models/RefInItems.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_not_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_ref_in_not_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_not_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_not_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_not_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_not_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**]({{complexTypePrefix}}PropertyNamedRefThatIsNotAReference.md) | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_oneof_response_body_for_content_types** - -> RefInOneof post_ref_in_oneof_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_oneof_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_oneof_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_oneof_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInOneof**](../../models/RefInOneof.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_ref_in_property_response_body_for_content_types** - -> RefInProperty post_ref_in_property_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.ref_in_property import RefInProperty -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_ref_in_property_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_ref_in_property_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_ref_in_property_response_body_for_content_types.ApiResponseFor200) | success - -#### post_ref_in_property_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RefInProperty**](../../models/RefInProperty.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_default_validation_response_body_for_content_types** - -> RequiredDefaultValidation post_required_default_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_default_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_default_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_default_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_default_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredDefaultValidation**](../../models/RequiredDefaultValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_validation_response_body_for_content_types** - -> RequiredValidation post_required_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.required_validation import RequiredValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredValidation**](../../models/RequiredValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_empty_array_response_body_for_content_types** - -> RequiredWithEmptyArray post_required_with_empty_array_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_empty_array_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_with_empty_array_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_empty_array_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**RequiredWithEmptyArray**](../../models/RequiredWithEmptyArray.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_required_with_escaped_characters_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_required_with_escaped_characters_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_required_with_escaped_characters_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_required_with_escaped_characters_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200) | success - -#### post_required_with_escaped_characters_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_simple_enum_validation_response_body_for_content_types** - -> SimpleEnumValidation post_simple_enum_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_simple_enum_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_simple_enum_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_simple_enum_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**SimpleEnumValidation**](../../models/SimpleEnumValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_response_body_for_content_types** - -> str post_string_type_matches_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types** - -> TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200) | success - -#### post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing**](../../models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_response_body_for_content_types** - -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_response_body_for_content_types** - -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_reference_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_reference_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_reference_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_reference_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_reference_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_reference_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uri_template_format_response_body_for_content_types** - -> bool, date, datetime, dict, float, int, list, str, none_type post_uri_template_format_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import response_content_content_type_schema_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = response_content_content_type_schema_api.ResponseContentContentTypeSchemaApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uri_template_format_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling ResponseContentContentTypeSchemaApi->post_uri_template_format_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uri_template_format_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uri_template_format_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/TypeApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/TypeApi.md deleted file mode 100644 index 26708e21ae8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/TypeApi.md +++ /dev/null @@ -1,941 +0,0 @@ - -# unit_test_api.apis.tags.type_api.TypeApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_array_type_matches_arrays_request_body**](#post_array_type_matches_arrays_request_body) | **post** /requestBody/postArrayTypeMatchesArraysRequestBody | -[**post_array_type_matches_arrays_response_body_for_content_types**](#post_array_type_matches_arrays_response_body_for_content_types) | **post** /responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes | -[**post_boolean_type_matches_booleans_request_body**](#post_boolean_type_matches_booleans_request_body) | **post** /requestBody/postBooleanTypeMatchesBooleansRequestBody | -[**post_boolean_type_matches_booleans_response_body_for_content_types**](#post_boolean_type_matches_booleans_response_body_for_content_types) | **post** /responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes | -[**post_integer_type_matches_integers_request_body**](#post_integer_type_matches_integers_request_body) | **post** /requestBody/postIntegerTypeMatchesIntegersRequestBody | -[**post_integer_type_matches_integers_response_body_for_content_types**](#post_integer_type_matches_integers_response_body_for_content_types) | **post** /responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes | -[**post_null_type_matches_only_the_null_object_request_body**](#post_null_type_matches_only_the_null_object_request_body) | **post** /requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody | -[**post_null_type_matches_only_the_null_object_response_body_for_content_types**](#post_null_type_matches_only_the_null_object_response_body_for_content_types) | **post** /responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes | -[**post_number_type_matches_numbers_request_body**](#post_number_type_matches_numbers_request_body) | **post** /requestBody/postNumberTypeMatchesNumbersRequestBody | -[**post_number_type_matches_numbers_response_body_for_content_types**](#post_number_type_matches_numbers_response_body_for_content_types) | **post** /responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes | -[**post_object_type_matches_objects_request_body**](#post_object_type_matches_objects_request_body) | **post** /requestBody/postObjectTypeMatchesObjectsRequestBody | -[**post_object_type_matches_objects_response_body_for_content_types**](#post_object_type_matches_objects_response_body_for_content_types) | **post** /responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes | -[**post_string_type_matches_strings_request_body**](#post_string_type_matches_strings_request_body) | **post** /requestBody/postStringTypeMatchesStringsRequestBody | -[**post_string_type_matches_strings_response_body_for_content_types**](#post_string_type_matches_strings_response_body_for_content_types) | **post** /responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes | - -# **post_array_type_matches_arrays_request_body** - -> post_array_type_matches_arrays_request_body(array_type_matches_arrays) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = ArrayTypeMatchesArrays([ - None - ]) - try: - api_response = api_instance.post_array_type_matches_arrays_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_array_type_matches_arrays_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_request_body.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_array_type_matches_arrays_response_body_for_content_types** - -> ArrayTypeMatchesArrays post_array_type_matches_arrays_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_array_type_matches_arrays_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_array_type_matches_arrays_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200) | success - -#### post_array_type_matches_arrays_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayTypeMatchesArrays**](../../models/ArrayTypeMatchesArrays.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_request_body** - -> post_boolean_type_matches_booleans_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = True - try: - api_response = api_instance.post_boolean_type_matches_booleans_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_boolean_type_matches_booleans_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_request_body.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_boolean_type_matches_booleans_response_body_for_content_types** - -> bool post_boolean_type_matches_booleans_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_boolean_type_matches_booleans_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_boolean_type_matches_booleans_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200) | success - -#### post_boolean_type_matches_booleans_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_request_body** - -> post_integer_type_matches_integers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = 1 - try: - api_response = api_instance.post_integer_type_matches_integers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_integer_type_matches_integers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_request_body.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_integer_type_matches_integers_response_body_for_content_types** - -> int post_integer_type_matches_integers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_integer_type_matches_integers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_integer_type_matches_integers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_integer_type_matches_integers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_request_body** - -> post_null_type_matches_only_the_null_object_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = None - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_null_type_matches_only_the_null_object_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_null_type_matches_only_the_null_object_response_body_for_content_types** - -> none_type post_null_type_matches_only_the_null_object_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_null_type_matches_only_the_null_object_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_null_type_matches_only_the_null_object_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200) | success - -#### post_null_type_matches_only_the_null_object_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_request_body** - -> post_number_type_matches_numbers_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = 3.14 - try: - api_response = api_instance.post_number_type_matches_numbers_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_number_type_matches_numbers_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_request_body.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_number_type_matches_numbers_response_body_for_content_types** - -> int, float post_number_type_matches_numbers_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_number_type_matches_numbers_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_number_type_matches_numbers_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200) | success - -#### post_number_type_matches_numbers_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_request_body** - -> post_object_type_matches_objects_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - api_response = api_instance.post_object_type_matches_objects_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_object_type_matches_objects_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_request_body.ApiResponseFor200) | success - -#### post_object_type_matches_objects_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_object_type_matches_objects_response_body_for_content_types** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} post_object_type_matches_objects_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_object_type_matches_objects_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_object_type_matches_objects_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200) | success - -#### post_object_type_matches_objects_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_request_body** - -> post_string_type_matches_strings_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example passing only required values which don't have defaults set - body = "body_example" - try: - api_response = api_instance.post_string_type_matches_strings_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_string_type_matches_strings_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_request_body.ApiResponseFor200) | success - -#### post_string_type_matches_strings_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_string_type_matches_strings_response_body_for_content_types** - -> str post_string_type_matches_strings_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import type_api -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = type_api.TypeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_string_type_matches_strings_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling TypeApi->post_string_type_matches_strings_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200) | success - -#### post_string_type_matches_strings_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/UniqueItemsApi.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/UniqueItemsApi.md deleted file mode 100644 index f95123c7209..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/apis/tags/UniqueItemsApi.md +++ /dev/null @@ -1,274 +0,0 @@ - -# unit_test_api.apis.tags.unique_items_api.UniqueItemsApi - -All URIs are relative to *https://someserver.com/v1* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**post_uniqueitems_false_validation_request_body**](#post_uniqueitems_false_validation_request_body) | **post** /requestBody/postUniqueitemsFalseValidationRequestBody | -[**post_uniqueitems_false_validation_response_body_for_content_types**](#post_uniqueitems_false_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes | -[**post_uniqueitems_validation_request_body**](#post_uniqueitems_validation_request_body) | **post** /requestBody/postUniqueitemsValidationRequestBody | -[**post_uniqueitems_validation_response_body_for_content_types**](#post_uniqueitems_validation_response_body_for_content_types) | **post** /responseBody/postUniqueitemsValidationResponseBodyForContentTypes | - -# **post_uniqueitems_false_validation_request_body** - -> post_uniqueitems_false_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import unique_items_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = unique_items_api.UniqueItemsApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsFalseValidation(None) - try: - api_response = api_instance.post_uniqueitems_false_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling UniqueItemsApi->post_uniqueitems_false_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_false_validation_response_body_for_content_types** - -> UniqueitemsFalseValidation post_uniqueitems_false_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import unique_items_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = unique_items_api.UniqueItemsApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_false_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling UniqueItemsApi->post_uniqueitems_false_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_false_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsFalseValidation**](../../models/UniqueitemsFalseValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_request_body** - -> post_uniqueitems_validation_request_body(body) - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import unique_items_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = unique_items_api.UniqueItemsApi(api_client) - - # example passing only required values which don't have defaults set - body = UniqueitemsValidation(None) - try: - api_response = api_instance.post_uniqueitems_validation_request_body( - body=body, - ) - except unit_test_api.ApiException as e: - print("Exception when calling UniqueItemsApi->post_uniqueitems_validation_request_body: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_request_body.ApiResponseFor200) | success - -#### post_uniqueitems_validation_request_body.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **post_uniqueitems_validation_response_body_for_content_types** - -> UniqueitemsValidation post_uniqueitems_validation_response_body_for_content_types() - - - -### Example - -```python -import unit_test_api -from unit_test_api.apis.tags import unique_items_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from pprint import pprint -# Defining the host is optional and defaults to https://someserver.com/v1 -# See configuration.py for a list of all supported configuration parameters. -configuration = unit_test_api.Configuration( - host = "https://someserver.com/v1" -) - -# Enter a context with an instance of the API client -with unit_test_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = unique_items_api.UniqueItemsApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.post_uniqueitems_validation_response_body_for_content_types() - pprint(api_response) - except unit_test_api.ApiException as e: - print("Exception when calling UniqueItemsApi->post_uniqueitems_validation_response_body_for_content_types: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200) | success - -#### post_uniqueitems_validation_response_body_for_content_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**UniqueitemsValidation**](../../models/UniqueitemsValidation.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md deleted file mode 100644 index e32452e5c8b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAllowsASchemaWhichShouldValidate.md +++ /dev/null @@ -1,16 +0,0 @@ -# unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate.AdditionalpropertiesAllowsASchemaWhichShouldValidate - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**bar** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | bool, | BoolClass, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAreAllowedByDefault.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAreAllowedByDefault.md deleted file mode 100644 index 7548452e43d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesAreAllowedByDefault.md +++ /dev/null @@ -1,16 +0,0 @@ -# unit_test_api.model.additionalproperties_are_allowed_by_default.AdditionalpropertiesAreAllowedByDefault - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**bar** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesCanExistByItself.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesCanExistByItself.md deleted file mode 100644 index 09f1d02d8d2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesCanExistByItself.md +++ /dev/null @@ -1,14 +0,0 @@ -# unit_test_api.model.additionalproperties_can_exist_by_itself.AdditionalpropertiesCanExistByItself - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | bool, | BoolClass, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesShouldNotLookInApplicators.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesShouldNotLookInApplicators.md deleted file mode 100644 index fa1430a42e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AdditionalpropertiesShouldNotLookInApplicators.md +++ /dev/null @@ -1,33 +0,0 @@ -# unit_test_api.model.additionalproperties_should_not_look_in_applicators.AdditionalpropertiesShouldNotLookInApplicators - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | bool, | BoolClass, | any string name can be used but the value must be the correct type | [optional] - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Allof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Allof.md deleted file mode 100644 index db9cd5c7207..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Allof.md +++ /dev/null @@ -1,42 +0,0 @@ -# unit_test_api.model.allof.Allof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofCombinedWithAnyofOneof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofCombinedWithAnyofOneof.md deleted file mode 100644 index 5b26a94969d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofCombinedWithAnyofOneof.md +++ /dev/null @@ -1,44 +0,0 @@ -# unit_test_api.model.allof_combined_with_anyof_oneof.AllofCombinedWithAnyofOneof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofSimpleTypes.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofSimpleTypes.md deleted file mode 100644 index 75e8863db69..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofSimpleTypes.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.allof_simple_types.AllofSimpleTypes - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithBaseSchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithBaseSchema.md deleted file mode 100644 index e9db83fae8a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithBaseSchema.md +++ /dev/null @@ -1,48 +0,0 @@ -# unit_test_api.model.allof_with_base_schema.AllofWithBaseSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**baz** | None, | NoneClass, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithOneEmptySchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithOneEmptySchema.md deleted file mode 100644 index 429e2ac820e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithOneEmptySchema.md +++ /dev/null @@ -1,22 +0,0 @@ -# unit_test_api.model.allof_with_one_empty_schema.AllofWithOneEmptySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheFirstEmptySchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheFirstEmptySchema.md deleted file mode 100644 index bb6fd4199b3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheFirstEmptySchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.allof_with_the_first_empty_schema.AllofWithTheFirstEmptySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[all_of_1](#all_of_1) | decimal.Decimal, int, float, | decimal.Decimal, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheLastEmptySchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheLastEmptySchema.md deleted file mode 100644 index 2e40966de71..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTheLastEmptySchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.allof_with_the_last_empty_schema.AllofWithTheLastEmptySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | decimal.Decimal, int, float, | decimal.Decimal, | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTwoEmptySchemas.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTwoEmptySchemas.md deleted file mode 100644 index 1bc82005d3d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AllofWithTwoEmptySchemas.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.allof_with_two_empty_schemas.AllofWithTwoEmptySchemas - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Anyof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Anyof.md deleted file mode 100644 index 53747ab915a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Anyof.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.anyof.Anyof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | decimal.Decimal, int, | decimal.Decimal, | | -[any_of_1](#any_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# any_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofComplexTypes.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofComplexTypes.md deleted file mode 100644 index 12f091e3c9a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofComplexTypes.md +++ /dev/null @@ -1,42 +0,0 @@ -# unit_test_api.model.anyof_complex_types.AnyofComplexTypes - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[any_of_1](#any_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# any_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithBaseSchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithBaseSchema.md deleted file mode 100644 index ad1b6b4d57f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithBaseSchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.anyof_with_base_schema.AnyofWithBaseSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[any_of_1](#any_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithOneEmptySchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithOneEmptySchema.md deleted file mode 100644 index 12c5c930674..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/AnyofWithOneEmptySchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.anyof_with_one_empty_schema.AnyofWithOneEmptySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | decimal.Decimal, int, float, | decimal.Decimal, | | -[any_of_1](#any_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -# any_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ArrayTypeMatchesArrays.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ArrayTypeMatchesArrays.md deleted file mode 100644 index ea887dfa1be..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ArrayTypeMatchesArrays.md +++ /dev/null @@ -1,14 +0,0 @@ -# unit_test_api.model.array_type_matches_arrays.ArrayTypeMatchesArrays - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BooleanTypeMatchesBooleans.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BooleanTypeMatchesBooleans.md deleted file mode 100644 index 63d7e87453b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BooleanTypeMatchesBooleans.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.boolean_type_matches_booleans.BooleanTypeMatchesBooleans - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByInt.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByInt.md deleted file mode 100644 index 7c7c706c1a8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByInt.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.by_int.ByInt - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByNumber.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByNumber.md deleted file mode 100644 index 4f58cada0e6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ByNumber.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.by_number.ByNumber - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BySmallNumber.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BySmallNumber.md deleted file mode 100644 index 7b61298957f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/BySmallNumber.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.by_small_number.BySmallNumber - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/DateTimeFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/DateTimeFormat.md deleted file mode 100644 index 4dffa18e51c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/DateTimeFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.date_time_format.DateTimeFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | value must conform to RFC-3339 date-time - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EmailFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EmailFormat.md deleted file mode 100644 index 1a2bb153a20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EmailFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.email_format.EmailFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith0DoesNotMatchFalse.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith0DoesNotMatchFalse.md deleted file mode 100644 index 8acc40f17f4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith0DoesNotMatchFalse.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.enum_with0_does_not_match_false.EnumWith0DoesNotMatchFalse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [0, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith1DoesNotMatchTrue.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith1DoesNotMatchTrue.md deleted file mode 100644 index 40b4a8a2f55..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWith1DoesNotMatchTrue.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.enum_with1_does_not_match_true.EnumWith1DoesNotMatchTrue - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithEscapedCharacters.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithEscapedCharacters.md deleted file mode 100644 index 7910c5126ea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithEscapedCharacters.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.enum_with_escaped_characters.EnumWithEscapedCharacters - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["foo\nbar", "foo\rbar", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithFalseDoesNotMatch0.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithFalseDoesNotMatch0.md deleted file mode 100644 index 19b1b49815d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithFalseDoesNotMatch0.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.enum_with_false_does_not_match0.EnumWithFalseDoesNotMatch0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | must be one of [False, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithTrueDoesNotMatch1.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithTrueDoesNotMatch1.md deleted file mode 100644 index 469529fa841..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumWithTrueDoesNotMatch1.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.enum_with_true_does_not_match1.EnumWithTrueDoesNotMatch1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | must be one of [True, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumsInProperties.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumsInProperties.md deleted file mode 100644 index 0e08a4a23d2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/EnumsInProperties.md +++ /dev/null @@ -1,16 +0,0 @@ -# unit_test_api.model.enums_in_properties.EnumsInProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | str, | str, | | must be one of ["bar", ] -**foo** | str, | str, | | [optional] must be one of ["foo", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ForbiddenProperty.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ForbiddenProperty.md deleted file mode 100644 index 3fc2175e9b0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ForbiddenProperty.md +++ /dev/null @@ -1,35 +0,0 @@ -# unit_test_api.model.forbidden_property.ForbiddenProperty - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[foo](#foo)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# foo - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/HostnameFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/HostnameFormat.md deleted file mode 100644 index 5efd27d124f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/HostnameFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.hostname_format.HostnameFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/IntegerTypeMatchesIntegers.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/IntegerTypeMatchesIntegers.md deleted file mode 100644 index 2575c1ca534..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/IntegerTypeMatchesIntegers.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.integer_type_matches_integers.IntegerTypeMatchesIntegers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md deleted file mode 100644 index 753345128a8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf.InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidStringValueForDefault.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidStringValueForDefault.md deleted file mode 100644 index 296bfd73517..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/InvalidStringValueForDefault.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.invalid_string_value_for_default.InvalidStringValueForDefault - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | str, | str, | | [optional] if omitted the server will use the default value of "bad" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv4Format.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv4Format.md deleted file mode 100644 index 67ab85c9349..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv4Format.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.ipv4_format.Ipv4Format - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv6Format.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv6Format.md deleted file mode 100644 index e2086bee89b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Ipv6Format.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.ipv6_format.Ipv6Format - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/JsonPointerFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/JsonPointerFormat.md deleted file mode 100644 index 40675571904..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/JsonPointerFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.json_pointer_format.JsonPointerFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidation.md deleted file mode 100644 index 826c055762d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maximum_validation.MaximumValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidationWithUnsignedInteger.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidationWithUnsignedInteger.md deleted file mode 100644 index edc23e16bca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaximumValidationWithUnsignedInteger.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maximum_validation_with_unsigned_integer.MaximumValidationWithUnsignedInteger - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxitemsValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxitemsValidation.md deleted file mode 100644 index 0aa20c0e8c9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxitemsValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maxitems_validation.MaxitemsValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxlengthValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxlengthValidation.md deleted file mode 100644 index 030db5c34fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxlengthValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maxlength_validation.MaxlengthValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Maxproperties0MeansTheObjectIsEmpty.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Maxproperties0MeansTheObjectIsEmpty.md deleted file mode 100644 index 1bbc951f004..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Maxproperties0MeansTheObjectIsEmpty.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maxproperties0_means_the_object_is_empty.Maxproperties0MeansTheObjectIsEmpty - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxpropertiesValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxpropertiesValidation.md deleted file mode 100644 index e68e3d87adc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MaxpropertiesValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.maxproperties_validation.MaxpropertiesValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidation.md deleted file mode 100644 index 768068c3a63..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.minimum_validation.MinimumValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidationWithSignedInteger.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidationWithSignedInteger.md deleted file mode 100644 index 59d2cb9edfd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinimumValidationWithSignedInteger.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.minimum_validation_with_signed_integer.MinimumValidationWithSignedInteger - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinitemsValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinitemsValidation.md deleted file mode 100644 index 48bbb8e3094..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinitemsValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.minitems_validation.MinitemsValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinlengthValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinlengthValidation.md deleted file mode 100644 index 43ec10fc791..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinlengthValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.minlength_validation.MinlengthValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinpropertiesValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinpropertiesValidation.md deleted file mode 100644 index b5ab4b4fcb7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/MinpropertiesValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.minproperties_validation.MinpropertiesValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ModelNot.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ModelNot.md deleted file mode 100644 index e7f25eaa6e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ModelNot.md +++ /dev/null @@ -1,22 +0,0 @@ -# unit_test_api.model.model_not.ModelNot - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | decimal.Decimal, int, | decimal.Decimal, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAllofToCheckValidationSemantics.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAllofToCheckValidationSemantics.md deleted file mode 100644 index c760ab62bf0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAllofToCheckValidationSemantics.md +++ /dev/null @@ -1,35 +0,0 @@ -# unit_test_api.model.nested_allof_to_check_validation_semantics.NestedAllofToCheckValidationSemantics - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | None, | NoneClass, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAnyofToCheckValidationSemantics.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAnyofToCheckValidationSemantics.md deleted file mode 100644 index 747506abdca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedAnyofToCheckValidationSemantics.md +++ /dev/null @@ -1,35 +0,0 @@ -# unit_test_api.model.nested_anyof_to_check_validation_semantics.NestedAnyofToCheckValidationSemantics - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | None, | NoneClass, | | - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedItems.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedItems.md deleted file mode 100644 index 2247f45f60d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedItems.md +++ /dev/null @@ -1,50 +0,0 @@ -# unit_test_api.model.nested_items.NestedItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedOneofToCheckValidationSemantics.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedOneofToCheckValidationSemantics.md deleted file mode 100644 index a225e1f6767..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NestedOneofToCheckValidationSemantics.md +++ /dev/null @@ -1,35 +0,0 @@ -# unit_test_api.model.nested_oneof_to_check_validation_semantics.NestedOneofToCheckValidationSemantics - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | None, | NoneClass, | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NotMoreComplexSchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NotMoreComplexSchema.md deleted file mode 100644 index 45e198b3770..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NotMoreComplexSchema.md +++ /dev/null @@ -1,28 +0,0 @@ -# unit_test_api.model.not_more_complex_schema.NotMoreComplexSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NulCharactersInStrings.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NulCharactersInStrings.md deleted file mode 100644 index 8532d97c92e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NulCharactersInStrings.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.nul_characters_in_strings.NulCharactersInStrings - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["hello\x00there", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NullTypeMatchesOnlyTheNullObject.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NullTypeMatchesOnlyTheNullObject.md deleted file mode 100644 index 9a8e21c21be..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NullTypeMatchesOnlyTheNullObject.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.null_type_matches_only_the_null_object.NullTypeMatchesOnlyTheNullObject - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NumberTypeMatchesNumbers.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NumberTypeMatchesNumbers.md deleted file mode 100644 index deebc8ff56d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/NumberTypeMatchesNumbers.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.number_type_matches_numbers.NumberTypeMatchesNumbers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectPropertiesValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectPropertiesValidation.md deleted file mode 100644 index 9d145f83123..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/ObjectPropertiesValidation.md +++ /dev/null @@ -1,16 +0,0 @@ -# unit_test_api.model.object_properties_validation.ObjectPropertiesValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**bar** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Oneof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Oneof.md deleted file mode 100644 index 0c056074c41..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/Oneof.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.oneof.Oneof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | decimal.Decimal, int, | decimal.Decimal, | | -[one_of_1](#one_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# one_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofComplexTypes.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofComplexTypes.md deleted file mode 100644 index 57278d6a7eb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofComplexTypes.md +++ /dev/null @@ -1,42 +0,0 @@ -# unit_test_api.model.oneof_complex_types.OneofComplexTypes - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[one_of_1](#one_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | decimal.Decimal, int, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# one_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithBaseSchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithBaseSchema.md deleted file mode 100644 index 20776594f4e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithBaseSchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.oneof_with_base_schema.OneofWithBaseSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[one_of_1](#one_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithEmptySchema.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithEmptySchema.md deleted file mode 100644 index f420f5c61de..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithEmptySchema.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.oneof_with_empty_schema.OneofWithEmptySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | decimal.Decimal, int, float, | decimal.Decimal, | | -[one_of_1](#one_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -# one_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithRequired.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithRequired.md deleted file mode 100644 index e9ba38802cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/OneofWithRequired.md +++ /dev/null @@ -1,30 +0,0 @@ -# unit_test_api.model.oneof_with_required.OneofWithRequired - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -[one_of_1](#one_of_1) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternIsNotAnchored.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternIsNotAnchored.md deleted file mode 100644 index e9b758d826c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternIsNotAnchored.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.pattern_is_not_anchored.PatternIsNotAnchored - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternValidation.md deleted file mode 100644 index a2c7e75f30b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PatternValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.pattern_validation.PatternValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertiesWithEscapedCharacters.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertiesWithEscapedCharacters.md deleted file mode 100644 index 7505eb4e1ce..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertiesWithEscapedCharacters.md +++ /dev/null @@ -1,20 +0,0 @@ -# unit_test_api.model.properties_with_escaped_characters.PropertiesWithEscapedCharacters - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo\nbar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**foo\"bar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**foo\\bar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**foo\rbar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**foo\tbar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**foo\fbar** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertyNamedRefThatIsNotAReference.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertyNamedRefThatIsNotAReference.md deleted file mode 100644 index 4d0ec592570..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/PropertyNamedRefThatIsNotAReference.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.property_named_ref_that_is_not_a_reference.PropertyNamedRefThatIsNotAReference - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**$ref** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAdditionalproperties.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAdditionalproperties.md deleted file mode 100644 index 15d5366ac51..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAdditionalproperties.md +++ /dev/null @@ -1,14 +0,0 @@ -# unit_test_api.model.ref_in_additionalproperties.RefInAdditionalproperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAllof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAllof.md deleted file mode 100644 index 12158f9e282..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAllof.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.ref_in_allof.RefInAllof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAnyof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAnyof.md deleted file mode 100644 index 5ff141f69b4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInAnyof.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.ref_in_anyof.RefInAnyof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInItems.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInItems.md deleted file mode 100644 index 687a4da176c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInItems.md +++ /dev/null @@ -1,14 +0,0 @@ -# unit_test_api.model.ref_in_items.RefInItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInNot.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInNot.md deleted file mode 100644 index 4414c35841d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInNot.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.ref_in_not.RefInNot - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInOneof.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInOneof.md deleted file mode 100644 index 68659fd58a0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInOneof.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.ref_in_oneof.RefInOneof - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[PropertyNamedRefThatIsNotAReference](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInProperty.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInProperty.md deleted file mode 100644 index 67ac9dd119e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RefInProperty.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.ref_in_property.RefInProperty - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**a** | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | [**PropertyNamedRefThatIsNotAReference**](PropertyNamedRefThatIsNotAReference.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredDefaultValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredDefaultValidation.md deleted file mode 100644 index 942d13d2644..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredDefaultValidation.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.required_default_validation.RequiredDefaultValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredValidation.md deleted file mode 100644 index 0bdb9e64611..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredValidation.md +++ /dev/null @@ -1,16 +0,0 @@ -# unit_test_api.model.required_validation.RequiredValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -**bar** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEmptyArray.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEmptyArray.md deleted file mode 100644 index 097a433c649..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEmptyArray.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.required_with_empty_array.RequiredWithEmptyArray - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**foo** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEscapedCharacters.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEscapedCharacters.md deleted file mode 100644 index a89c4b8bf84..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/RequiredWithEscapedCharacters.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.required_with_escaped_characters.RequiredWithEscapedCharacters - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/SimpleEnumValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/SimpleEnumValidation.md deleted file mode 100644 index 12c0eaf4f83..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/SimpleEnumValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.simple_enum_validation.SimpleEnumValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1, 2, 3, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/StringTypeMatchesStrings.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/StringTypeMatchesStrings.md deleted file mode 100644 index 6cee3b4720c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/StringTypeMatchesStrings.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.string_type_matches_strings.StringTypeMatchesStrings - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md deleted file mode 100644 index 5d3e5000007..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.md +++ /dev/null @@ -1,15 +0,0 @@ -# unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing.TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**alpha** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] if omitted the server will use the default value of 5 -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsFalseValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsFalseValidation.md deleted file mode 100644 index f06a22b0be2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsFalseValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.uniqueitems_false_validation.UniqueitemsFalseValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsValidation.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsValidation.md deleted file mode 100644 index 89fe7ce6572..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UniqueitemsValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.uniqueitems_validation.UniqueitemsValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriFormat.md deleted file mode 100644 index 82ee5f3cdb0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.uri_format.UriFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriReferenceFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriReferenceFormat.md deleted file mode 100644 index c0bdbf8e260..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriReferenceFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.uri_reference_format.UriReferenceFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriTemplateFormat.md b/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriTemplateFormat.md deleted file mode 100644 index cfb0c0c98d4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/docs/models/UriTemplateFormat.md +++ /dev/null @@ -1,9 +0,0 @@ -# unit_test_api.model.uri_template_format.UriTemplateFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh b/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/pom.xml b/samples/openapi3/client/3_0_3_unit_test/python/pom.xml deleted file mode 100644 index 5352ff0ac54..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PythonExperimental303UnitTests - pom - 1.0-SNAPSHOT - Python Experimental OpenAPI3 Unit Test Api Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - test - integration-test - - exec - - - make - - test - - - - - - - - \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt deleted file mode 100644 index 3cb6612669d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 -setuptools >= 21.0.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/setup.cfg b/samples/openapi3/client/3_0_3_unit_test/python/setup.cfg deleted file mode 100644 index 11433ee875a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/setup.py b/samples/openapi3/client/3_0_3_unit_test/python/setup.py deleted file mode 100644 index 1fc837120cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "unit-test-api" -VERSION = "1.0.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "certifi >= 14.5.14", - "frozendict ~= 2.3.4", - "python-dateutil ~= 2.7.0", - "setuptools >= 21.0.0", - "typing_extensions ~= 4.3.0", - "urllib3 ~= 1.26.7", -] - -setup( - name=NAME, - version=VERSION, - description="openapi 3.0.3 sample spec", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "openapi 3.0.3 sample spec"], - python_requires=">=3.7", - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description="""\ - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - """ -) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt b/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt deleted file mode 100644 index 2d88b034192..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_allows_a_schema_which_should_validate.py deleted file mode 100644 index b946a7840f2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_allows_a_schema_which_should_validate.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from unit_test_api import configuration - - -class TestAdditionalpropertiesAllowsASchemaWhichShouldValidate(unittest.TestCase): - """AdditionalpropertiesAllowsASchemaWhichShouldValidate unit test stubs""" - _configuration = configuration.Configuration() - - def test_no_additional_properties_is_valid_passes(self): - # no additional properties is valid - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - def test_an_additional_invalid_property_is_invalid_fails(self): - # an additional invalid property is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - }, - _configuration=self._configuration - ) - - def test_an_additional_valid_property_is_valid_passes(self): - # an additional valid property is valid - AdditionalpropertiesAllowsASchemaWhichShouldValidate.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_are_allowed_by_default.py deleted file mode 100644 index ede7b006506..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_are_allowed_by_default.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from unit_test_api import configuration - - -class TestAdditionalpropertiesAreAllowedByDefault(unittest.TestCase): - """AdditionalpropertiesAreAllowedByDefault unit test stubs""" - _configuration = configuration.Configuration() - - def test_additional_properties_are_allowed_passes(self): - # additional properties are allowed - AdditionalpropertiesAreAllowedByDefault.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_can_exist_by_itself.py deleted file mode 100644 index fd4c4b4e9f9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_can_exist_by_itself.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from unit_test_api import configuration - - -class TestAdditionalpropertiesCanExistByItself(unittest.TestCase): - """AdditionalpropertiesCanExistByItself unit test stubs""" - _configuration = configuration.Configuration() - - def test_an_additional_invalid_property_is_invalid_fails(self): - # an additional invalid property is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesCanExistByItself.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - def test_an_additional_valid_property_is_valid_passes(self): - # an additional valid property is valid - AdditionalpropertiesCanExistByItself.from_openapi_data_oapg( - { - "foo": - True, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_should_not_look_in_applicators.py deleted file mode 100644 index cc08697897f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_additionalproperties_should_not_look_in_applicators.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from unit_test_api import configuration - - -class TestAdditionalpropertiesShouldNotLookInApplicators(unittest.TestCase): - """AdditionalpropertiesShouldNotLookInApplicators unit test stubs""" - _configuration = configuration.Configuration() - - def test_properties_defined_in_allof_are_not_examined_fails(self): - # properties defined in allOf are not examined - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AdditionalpropertiesShouldNotLookInApplicators.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - True, - }, - _configuration=self._configuration - ) - - def test_valid_test_case_passes(self): - # valid test case - AdditionalpropertiesShouldNotLookInApplicators.from_openapi_data_oapg( - { - "foo": - False, - "bar": - True, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof.py deleted file mode 100644 index d03edae4b79..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof import Allof -from unit_test_api import configuration - - -class TestAllof(unittest.TestCase): - """Allof unit test stubs""" - _configuration = configuration.Configuration() - - def test_allof_passes(self): - # allOf - Allof.from_openapi_data_oapg( - { - "foo": - "baz", - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_mismatch_first_fails(self): - # mismatch first - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_oapg( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_mismatch_second_fails(self): - # mismatch second - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_oapg( - { - "foo": - "baz", - }, - _configuration=self._configuration - ) - - def test_wrong_type_fails(self): - # wrong type - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Allof.from_openapi_data_oapg( - { - "foo": - "baz", - "bar": - "quux", - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_combined_with_anyof_oneof.py deleted file mode 100644 index f1875ccfff7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_combined_with_anyof_oneof.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from unit_test_api import configuration - - -class TestAllofCombinedWithAnyofOneof(unittest.TestCase): - """AllofCombinedWithAnyofOneof unit test stubs""" - _configuration = configuration.Configuration() - - def test_allof_true_anyof_false_oneof_false_fails(self): - # allOf: true, anyOf: false, oneOf: false - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 2, - _configuration=self._configuration - ) - - def test_allof_false_anyof_false_oneof_true_fails(self): - # allOf: false, anyOf: false, oneOf: true - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 5, - _configuration=self._configuration - ) - - def test_allof_false_anyof_true_oneof_true_fails(self): - # allOf: false, anyOf: true, oneOf: true - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 15, - _configuration=self._configuration - ) - - def test_allof_true_anyof_true_oneof_false_fails(self): - # allOf: true, anyOf: true, oneOf: false - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 6, - _configuration=self._configuration - ) - - def test_allof_true_anyof_true_oneof_true_passes(self): - # allOf: true, anyOf: true, oneOf: true - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 30, - _configuration=self._configuration - ) - - def test_allof_true_anyof_false_oneof_true_fails(self): - # allOf: true, anyOf: false, oneOf: true - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 10, - _configuration=self._configuration - ) - - def test_allof_false_anyof_true_oneof_false_fails(self): - # allOf: false, anyOf: true, oneOf: false - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 3, - _configuration=self._configuration - ) - - def test_allof_false_anyof_false_oneof_false_fails(self): - # allOf: false, anyOf: false, oneOf: false - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofCombinedWithAnyofOneof.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_simple_types.py deleted file mode 100644 index 7f351098909..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_simple_types.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from unit_test_api import configuration - - -class TestAllofSimpleTypes(unittest.TestCase): - """AllofSimpleTypes unit test stubs""" - _configuration = configuration.Configuration() - - def test_valid_passes(self): - # valid - AllofSimpleTypes.from_openapi_data_oapg( - 25, - _configuration=self._configuration - ) - - def test_mismatch_one_fails(self): - # mismatch one - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofSimpleTypes.from_openapi_data_oapg( - 35, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_base_schema.py deleted file mode 100644 index f089c4a39fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_base_schema.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from unit_test_api import configuration - - -class TestAllofWithBaseSchema(unittest.TestCase): - """AllofWithBaseSchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_valid_passes(self): - # valid - AllofWithBaseSchema.from_openapi_data_oapg( - { - "foo": - "quux", - "bar": - 2, - "baz": - None, - }, - _configuration=self._configuration - ) - - def test_mismatch_first_allof_fails(self): - # mismatch first allOf - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_oapg( - { - "bar": - 2, - "baz": - None, - }, - _configuration=self._configuration - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_oapg( - { - "foo": - "quux", - "baz": - None, - }, - _configuration=self._configuration - ) - - def test_mismatch_both_fails(self): - # mismatch both - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_oapg( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_mismatch_second_allof_fails(self): - # mismatch second allOf - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithBaseSchema.from_openapi_data_oapg( - { - "foo": - "quux", - "bar": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_one_empty_schema.py deleted file mode 100644 index f3eee78309c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_one_empty_schema.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from unit_test_api import configuration - - -class TestAllofWithOneEmptySchema(unittest.TestCase): - """AllofWithOneEmptySchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_any_data_is_valid_passes(self): - # any data is valid - AllofWithOneEmptySchema.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_first_empty_schema.py deleted file mode 100644 index f30ef23cb29..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_first_empty_schema.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from unit_test_api import configuration - - -class TestAllofWithTheFirstEmptySchema(unittest.TestCase): - """AllofWithTheFirstEmptySchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_string_is_invalid_fails(self): - # string is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithTheFirstEmptySchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_number_is_valid_passes(self): - # number is valid - AllofWithTheFirstEmptySchema.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_last_empty_schema.py deleted file mode 100644 index 94e0a662c19..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_the_last_empty_schema.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from unit_test_api import configuration - - -class TestAllofWithTheLastEmptySchema(unittest.TestCase): - """AllofWithTheLastEmptySchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_string_is_invalid_fails(self): - # string is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AllofWithTheLastEmptySchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_number_is_valid_passes(self): - # number is valid - AllofWithTheLastEmptySchema.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_two_empty_schemas.py deleted file mode 100644 index db5b6fa9caf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_allof_with_two_empty_schemas.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from unit_test_api import configuration - - -class TestAllofWithTwoEmptySchemas(unittest.TestCase): - """AllofWithTwoEmptySchemas unit test stubs""" - _configuration = configuration.Configuration() - - def test_any_data_is_valid_passes(self): - # any data is valid - AllofWithTwoEmptySchemas.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof.py deleted file mode 100644 index d300d967d03..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.anyof import Anyof -from unit_test_api import configuration - - -class TestAnyof(unittest.TestCase): - """Anyof unit test stubs""" - _configuration = configuration.Configuration() - - def test_second_anyof_valid_passes(self): - # second anyOf valid - Anyof.from_openapi_data_oapg( - 2.5, - _configuration=self._configuration - ) - - def test_neither_anyof_valid_fails(self): - # neither anyOf valid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Anyof.from_openapi_data_oapg( - 1.5, - _configuration=self._configuration - ) - - def test_both_anyof_valid_passes(self): - # both anyOf valid - Anyof.from_openapi_data_oapg( - 3, - _configuration=self._configuration - ) - - def test_first_anyof_valid_passes(self): - # first anyOf valid - Anyof.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_complex_types.py deleted file mode 100644 index fc6d14191dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_complex_types.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from unit_test_api import configuration - - -class TestAnyofComplexTypes(unittest.TestCase): - """AnyofComplexTypes unit test stubs""" - _configuration = configuration.Configuration() - - def test_second_anyof_valid_complex_passes(self): - # second anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_oapg( - { - "foo": - "baz", - }, - _configuration=self._configuration - ) - - def test_neither_anyof_valid_complex_fails(self): - # neither anyOf valid (complex) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofComplexTypes.from_openapi_data_oapg( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - - def test_both_anyof_valid_complex_passes(self): - # both anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_oapg( - { - "foo": - "baz", - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_first_anyof_valid_complex_passes(self): - # first anyOf valid (complex) - AnyofComplexTypes.from_openapi_data_oapg( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_base_schema.py deleted file mode 100644 index 7edf767ad5b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_base_schema.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from unit_test_api import configuration - - -class TestAnyofWithBaseSchema(unittest.TestCase): - """AnyofWithBaseSchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_one_anyof_valid_passes(self): - # one anyOf valid - AnyofWithBaseSchema.from_openapi_data_oapg( - "foobar", - _configuration=self._configuration - ) - - def test_both_anyof_invalid_fails(self): - # both anyOf invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofWithBaseSchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - AnyofWithBaseSchema.from_openapi_data_oapg( - 3, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_one_empty_schema.py deleted file mode 100644 index 31cc78ca3c2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_anyof_with_one_empty_schema.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from unit_test_api import configuration - - -class TestAnyofWithOneEmptySchema(unittest.TestCase): - """AnyofWithOneEmptySchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_string_is_valid_passes(self): - # string is valid - AnyofWithOneEmptySchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_number_is_valid_passes(self): - # number is valid - AnyofWithOneEmptySchema.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_array_type_matches_arrays.py deleted file mode 100644 index 98fbd44a16c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_array_type_matches_arrays.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from unit_test_api import configuration - - -class TestArrayTypeMatchesArrays(unittest.TestCase): - """ArrayTypeMatchesArrays unit test stubs""" - _configuration = configuration.Configuration() - - def test_a_float_is_not_an_array_fails(self): - # a float is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_a_boolean_is_not_an_array_fails(self): - # a boolean is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_null_is_not_an_array_fails(self): - # null is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_an_object_is_not_an_array_fails(self): - # an object is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_a_string_is_not_an_array_fails(self): - # a string is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_an_array_is_an_array_passes(self): - # an array is an array - ArrayTypeMatchesArrays.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_an_integer_is_not_an_array_fails(self): - # an integer is not an array - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ArrayTypeMatchesArrays.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_boolean_type_matches_booleans.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_boolean_type_matches_booleans.py deleted file mode 100644 index fc20c8059dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_boolean_type_matches_booleans.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -from unit_test_api import configuration - - -class TestBooleanTypeMatchesBooleans(unittest.TestCase): - """BooleanTypeMatchesBooleans unit test stubs""" - _configuration = configuration.Configuration() - - def test_an_empty_string_is_not_a_boolean_fails(self): - # an empty string is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_a_float_is_not_a_boolean_fails(self): - # a float is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_null_is_not_a_boolean_fails(self): - # null is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_zero_is_not_a_boolean_fails(self): - # zero is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - def test_an_array_is_not_a_boolean_fails(self): - # an array is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_a_string_is_not_a_boolean_fails(self): - # a string is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_false_is_a_boolean_passes(self): - # false is a boolean - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_an_integer_is_not_a_boolean_fails(self): - # an integer is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_true_is_a_boolean_passes(self): - # true is a boolean - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_an_object_is_not_a_boolean_fails(self): - # an object is not a boolean - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BooleanTypeMatchesBooleans.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_int.py deleted file mode 100644 index 4abbab69a57..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_int.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.by_int import ByInt -from unit_test_api import configuration - - -class TestByInt(unittest.TestCase): - """ByInt unit test stubs""" - _configuration = configuration.Configuration() - - def test_int_by_int_fail_fails(self): - # int by int fail - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ByInt.from_openapi_data_oapg( - 7, - _configuration=self._configuration - ) - - def test_int_by_int_passes(self): - # int by int - ByInt.from_openapi_data_oapg( - 10, - _configuration=self._configuration - ) - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - ByInt.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_number.py deleted file mode 100644 index 9614cc470d1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_number.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.by_number import ByNumber -from unit_test_api import configuration - - -class TestByNumber(unittest.TestCase): - """ByNumber unit test stubs""" - _configuration = configuration.Configuration() - - def test_45_is_multiple_of15_passes(self): - # 4.5 is multiple of 1.5 - ByNumber.from_openapi_data_oapg( - 4.5, - _configuration=self._configuration - ) - - def test_35_is_not_multiple_of15_fails(self): - # 35 is not multiple of 1.5 - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ByNumber.from_openapi_data_oapg( - 35, - _configuration=self._configuration - ) - - def test_zero_is_multiple_of_anything_passes(self): - # zero is multiple of anything - ByNumber.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_small_number.py deleted file mode 100644 index 3a4e1449caf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_by_small_number.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.by_small_number import BySmallNumber -from unit_test_api import configuration - - -class TestBySmallNumber(unittest.TestCase): - """BySmallNumber unit test stubs""" - _configuration = configuration.Configuration() - - def test_000751_is_not_multiple_of00001_fails(self): - # 0.00751 is not multiple of 0.0001 - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - BySmallNumber.from_openapi_data_oapg( - 0.00751, - _configuration=self._configuration - ) - - def test_00075_is_multiple_of00001_passes(self): - # 0.0075 is multiple of 0.0001 - BySmallNumber.from_openapi_data_oapg( - 0.0075, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_date_time_format.py deleted file mode 100644 index 1fdd3e3614e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_date_time_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.date_time_format import DateTimeFormat -from unit_test_api import configuration - - -class TestDateTimeFormat(unittest.TestCase): - """DateTimeFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - DateTimeFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - DateTimeFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - DateTimeFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - DateTimeFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - DateTimeFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - DateTimeFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_email_format.py deleted file mode 100644 index 830b136aae6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_email_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.email_format import EmailFormat -from unit_test_api import configuration - - -class TestEmailFormat(unittest.TestCase): - """EmailFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - EmailFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - EmailFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - EmailFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - EmailFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - EmailFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - EmailFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with0_does_not_match_false.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with0_does_not_match_false.py deleted file mode 100644 index 5456b86202f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with0_does_not_match_false.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from unit_test_api import configuration - - -class TestEnumWith0DoesNotMatchFalse(unittest.TestCase): - """EnumWith0DoesNotMatchFalse unit test stubs""" - _configuration = configuration.Configuration() - - def test_integer_zero_is_valid_passes(self): - # integer zero is valid - EnumWith0DoesNotMatchFalse.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - def test_float_zero_is_valid_passes(self): - # float zero is valid - EnumWith0DoesNotMatchFalse.from_openapi_data_oapg( - 0.0, - _configuration=self._configuration - ) - - def test_false_is_invalid_fails(self): - # false is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWith0DoesNotMatchFalse.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with1_does_not_match_true.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with1_does_not_match_true.py deleted file mode 100644 index e9a97663fe6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with1_does_not_match_true.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from unit_test_api import configuration - - -class TestEnumWith1DoesNotMatchTrue(unittest.TestCase): - """EnumWith1DoesNotMatchTrue unit test stubs""" - _configuration = configuration.Configuration() - - def test_true_is_invalid_fails(self): - # true is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWith1DoesNotMatchTrue.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_integer_one_is_valid_passes(self): - # integer one is valid - EnumWith1DoesNotMatchTrue.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_float_one_is_valid_passes(self): - # float one is valid - EnumWith1DoesNotMatchTrue.from_openapi_data_oapg( - 1.0, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_escaped_characters.py deleted file mode 100644 index 4144f3b77d8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_escaped_characters.py +++ /dev/null @@ -1,47 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from unit_test_api import configuration - - -class TestEnumWithEscapedCharacters(unittest.TestCase): - """EnumWithEscapedCharacters unit test stubs""" - _configuration = configuration.Configuration() - - def test_member2_is_valid_passes(self): - # member 2 is valid - EnumWithEscapedCharacters.from_openapi_data_oapg( - "foo\rbar", - _configuration=self._configuration - ) - - def test_member1_is_valid_passes(self): - # member 1 is valid - EnumWithEscapedCharacters.from_openapi_data_oapg( - "foo\nbar", - _configuration=self._configuration - ) - - def test_another_string_is_invalid_fails(self): - # another string is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithEscapedCharacters.from_openapi_data_oapg( - "abc", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_false_does_not_match0.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_false_does_not_match0.py deleted file mode 100644 index ebd6bc55d45..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_false_does_not_match0.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from unit_test_api import configuration - - -class TestEnumWithFalseDoesNotMatch0(unittest.TestCase): - """EnumWithFalseDoesNotMatch0 unit test stubs""" - _configuration = configuration.Configuration() - - def test_false_is_valid_passes(self): - # false is valid - EnumWithFalseDoesNotMatch0.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_float_zero_is_invalid_fails(self): - # float zero is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithFalseDoesNotMatch0.from_openapi_data_oapg( - 0.0, - _configuration=self._configuration - ) - - def test_integer_zero_is_invalid_fails(self): - # integer zero is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithFalseDoesNotMatch0.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_true_does_not_match1.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_true_does_not_match1.py deleted file mode 100644 index 7827ca725b9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enum_with_true_does_not_match1.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from unit_test_api import configuration - - -class TestEnumWithTrueDoesNotMatch1(unittest.TestCase): - """EnumWithTrueDoesNotMatch1 unit test stubs""" - _configuration = configuration.Configuration() - - def test_float_one_is_invalid_fails(self): - # float one is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithTrueDoesNotMatch1.from_openapi_data_oapg( - 1.0, - _configuration=self._configuration - ) - - def test_true_is_valid_passes(self): - # true is valid - EnumWithTrueDoesNotMatch1.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_integer_one_is_invalid_fails(self): - # integer one is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumWithTrueDoesNotMatch1.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enums_in_properties.py deleted file mode 100644 index 3850f849db1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_enums_in_properties.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.enums_in_properties import EnumsInProperties -from unit_test_api import configuration - - -class TestEnumsInProperties(unittest.TestCase): - """EnumsInProperties unit test stubs""" - _configuration = configuration.Configuration() - - def test_missing_optional_property_is_valid_passes(self): - # missing optional property is valid - EnumsInProperties.from_openapi_data_oapg( - { - "bar": - "bar", - }, - _configuration=self._configuration - ) - - def test_wrong_foo_value_fails(self): - # wrong foo value - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_oapg( - { - "foo": - "foot", - "bar": - "bar", - }, - _configuration=self._configuration - ) - - def test_both_properties_are_valid_passes(self): - # both properties are valid - EnumsInProperties.from_openapi_data_oapg( - { - "foo": - "foo", - "bar": - "bar", - }, - _configuration=self._configuration - ) - - def test_wrong_bar_value_fails(self): - # wrong bar value - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_oapg( - { - "foo": - "foo", - "bar": - "bart", - }, - _configuration=self._configuration - ) - - def test_missing_all_properties_is_invalid_fails(self): - # missing all properties is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_missing_required_property_is_invalid_fails(self): - # missing required property is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - EnumsInProperties.from_openapi_data_oapg( - { - "foo": - "foo", - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_forbidden_property.py deleted file mode 100644 index f1db3521b1e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_forbidden_property.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.forbidden_property import ForbiddenProperty -from unit_test_api import configuration - - -class TestForbiddenProperty(unittest.TestCase): - """ForbiddenProperty unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_present_fails(self): - # property present - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ForbiddenProperty.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_property_absent_passes(self): - # property absent - ForbiddenProperty.from_openapi_data_oapg( - { - "bar": - 1, - "baz": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_hostname_format.py deleted file mode 100644 index 20c3febcb3e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_hostname_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.hostname_format import HostnameFormat -from unit_test_api import configuration - - -class TestHostnameFormat(unittest.TestCase): - """HostnameFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - HostnameFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - HostnameFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - HostnameFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - HostnameFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - HostnameFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - HostnameFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_integer_type_matches_integers.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_integer_type_matches_integers.py deleted file mode 100644 index 4ffba76e328..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_integer_type_matches_integers.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers -from unit_test_api import configuration - - -class TestIntegerTypeMatchesIntegers(unittest.TestCase): - """IntegerTypeMatchesIntegers unit test stubs""" - _configuration = configuration.Configuration() - - def test_an_object_is_not_an_integer_fails(self): - # an object is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_a_string_is_not_an_integer_fails(self): - # a string is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_null_is_not_an_integer_fails(self): - # null is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): - # a float with zero fractional part is an integer - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - 1.0, - _configuration=self._configuration - ) - - def test_a_float_is_not_an_integer_fails(self): - # a float is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_a_boolean_is_not_an_integer_fails(self): - # a boolean is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_an_integer_is_an_integer_passes(self): - # an integer is an integer - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): - # a string is still not an integer, even if it looks like one - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - "1", - _configuration=self._configuration - ) - - def test_an_array_is_not_an_integer_fails(self): - # an array is not an integer - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - IntegerTypeMatchesIntegers.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_instance_should_not_raise_error_when_float_division_inf.py deleted file mode 100644 index fb2c597c565..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_instance_should_not_raise_error_when_float_division_inf.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from unit_test_api import configuration - - -class TestInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf(unittest.TestCase): - """InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf unit test stubs""" - _configuration = configuration.Configuration() - - def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails(self): - # always invalid, but naive implementations may raise an overflow error - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.from_openapi_data_oapg( - 1.0E308, - _configuration=self._configuration - ) - - def test_valid_integer_with_multipleof_float_passes(self): - # valid integer with multipleOf float - InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf.from_openapi_data_oapg( - 123456789, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_string_value_for_default.py deleted file mode 100644 index c62e6e45b56..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_invalid_string_value_for_default.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from unit_test_api import configuration - - -class TestInvalidStringValueForDefault(unittest.TestCase): - """InvalidStringValueForDefault unit test stubs""" - _configuration = configuration.Configuration() - - def test_valid_when_property_is_specified_passes(self): - # valid when property is specified - InvalidStringValueForDefault.from_openapi_data_oapg( - { - "bar": - "good", - }, - _configuration=self._configuration - ) - - def test_still_valid_when_the_invalid_default_is_used_passes(self): - # still valid when the invalid default is used - InvalidStringValueForDefault.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv4_format.py deleted file mode 100644 index 19e925b9a7e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv4_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ipv4_format import Ipv4Format -from unit_test_api import configuration - - -class TestIpv4Format(unittest.TestCase): - """Ipv4Format unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - Ipv4Format.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - Ipv4Format.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - Ipv4Format.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - Ipv4Format.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - Ipv4Format.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - Ipv4Format.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv6_format.py deleted file mode 100644 index 09e7895b469..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ipv6_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ipv6_format import Ipv6Format -from unit_test_api import configuration - - -class TestIpv6Format(unittest.TestCase): - """Ipv6Format unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - Ipv6Format.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - Ipv6Format.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - Ipv6Format.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - Ipv6Format.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - Ipv6Format.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - Ipv6Format.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_json_pointer_format.py deleted file mode 100644 index 9b5fae8d6e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_json_pointer_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.json_pointer_format import JsonPointerFormat -from unit_test_api import configuration - - -class TestJsonPointerFormat(unittest.TestCase): - """JsonPointerFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - JsonPointerFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - JsonPointerFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - JsonPointerFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - JsonPointerFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - JsonPointerFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - JsonPointerFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation.py deleted file mode 100644 index b9cdf9e3617..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maximum_validation import MaximumValidation -from unit_test_api import configuration - - -class TestMaximumValidation(unittest.TestCase): - """MaximumValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_below_the_maximum_is_valid_passes(self): - # below the maximum is valid - MaximumValidation.from_openapi_data_oapg( - 2.6, - _configuration=self._configuration - ) - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - MaximumValidation.from_openapi_data_oapg( - 3.0, - _configuration=self._configuration - ) - - def test_above_the_maximum_is_invalid_fails(self): - # above the maximum is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaximumValidation.from_openapi_data_oapg( - 3.5, - _configuration=self._configuration - ) - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - MaximumValidation.from_openapi_data_oapg( - "x", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation_with_unsigned_integer.py deleted file mode 100644 index c18028ee2af..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maximum_validation_with_unsigned_integer.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from unit_test_api import configuration - - -class TestMaximumValidationWithUnsignedInteger(unittest.TestCase): - """MaximumValidationWithUnsignedInteger unit test stubs""" - _configuration = configuration.Configuration() - - def test_below_the_maximum_is_invalid_passes(self): - # below the maximum is invalid - MaximumValidationWithUnsignedInteger.from_openapi_data_oapg( - 299.97, - _configuration=self._configuration - ) - - def test_above_the_maximum_is_invalid_fails(self): - # above the maximum is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaximumValidationWithUnsignedInteger.from_openapi_data_oapg( - 300.5, - _configuration=self._configuration - ) - - def test_boundary_point_integer_is_valid_passes(self): - # boundary point integer is valid - MaximumValidationWithUnsignedInteger.from_openapi_data_oapg( - 300, - _configuration=self._configuration - ) - - def test_boundary_point_float_is_valid_passes(self): - # boundary point float is valid - MaximumValidationWithUnsignedInteger.from_openapi_data_oapg( - 300.0, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxitems_validation.py deleted file mode 100644 index 1a8afe4e9bb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxitems_validation.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from unit_test_api import configuration - - -class TestMaxitemsValidation(unittest.TestCase): - """MaxitemsValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_too_long_is_invalid_fails(self): - # too long is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxitemsValidation.from_openapi_data_oapg( - [ - 1, - 2, - 3, - ], - _configuration=self._configuration - ) - - def test_ignores_non_arrays_passes(self): - # ignores non-arrays - MaxitemsValidation.from_openapi_data_oapg( - "foobar", - _configuration=self._configuration - ) - - def test_shorter_is_valid_passes(self): - # shorter is valid - MaxitemsValidation.from_openapi_data_oapg( - [ - 1, - ], - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MaxitemsValidation.from_openapi_data_oapg( - [ - 1, - 2, - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxlength_validation.py deleted file mode 100644 index 7454b37934c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxlength_validation.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from unit_test_api import configuration - - -class TestMaxlengthValidation(unittest.TestCase): - """MaxlengthValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_too_long_is_invalid_fails(self): - # too long is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxlengthValidation.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_ignores_non_strings_passes(self): - # ignores non-strings - MaxlengthValidation.from_openapi_data_oapg( - 100, - _configuration=self._configuration - ) - - def test_shorter_is_valid_passes(self): - # shorter is valid - MaxlengthValidation.from_openapi_data_oapg( - "f", - _configuration=self._configuration - ) - - def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): - # two supplementary Unicode code points is long enough - MaxlengthValidation.from_openapi_data_oapg( - "💩💩", - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MaxlengthValidation.from_openapi_data_oapg( - "fo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties0_means_the_object_is_empty.py deleted file mode 100644 index 92a8cf2139a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties0_means_the_object_is_empty.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from unit_test_api import configuration - - -class TestMaxproperties0MeansTheObjectIsEmpty(unittest.TestCase): - """Maxproperties0MeansTheObjectIsEmpty unit test stubs""" - _configuration = configuration.Configuration() - - def test_no_properties_is_valid_passes(self): - # no properties is valid - Maxproperties0MeansTheObjectIsEmpty.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_one_property_is_invalid_fails(self): - # one property is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Maxproperties0MeansTheObjectIsEmpty.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties_validation.py deleted file mode 100644 index cc3684783b6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_maxproperties_validation.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from unit_test_api import configuration - - -class TestMaxpropertiesValidation(unittest.TestCase): - """MaxpropertiesValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_too_long_is_invalid_fails(self): - # too long is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MaxpropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - }, - _configuration=self._configuration - ) - - def test_ignores_arrays_passes(self): - # ignores arrays - MaxpropertiesValidation.from_openapi_data_oapg( - [ - 1, - 2, - 3, - ], - _configuration=self._configuration - ) - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - MaxpropertiesValidation.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_ignores_strings_passes(self): - # ignores strings - MaxpropertiesValidation.from_openapi_data_oapg( - "foobar", - _configuration=self._configuration - ) - - def test_shorter_is_valid_passes(self): - # shorter is valid - MaxpropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MaxpropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation.py deleted file mode 100644 index 9c3798fadb9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.minimum_validation import MinimumValidation -from unit_test_api import configuration - - -class TestMinimumValidation(unittest.TestCase): - """MinimumValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - MinimumValidation.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_below_the_minimum_is_invalid_fails(self): - # below the minimum is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidation.from_openapi_data_oapg( - 0.6, - _configuration=self._configuration - ) - - def test_above_the_minimum_is_valid_passes(self): - # above the minimum is valid - MinimumValidation.from_openapi_data_oapg( - 2.6, - _configuration=self._configuration - ) - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - MinimumValidation.from_openapi_data_oapg( - "x", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation_with_signed_integer.py deleted file mode 100644 index 02795c09294..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minimum_validation_with_signed_integer.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from unit_test_api import configuration - - -class TestMinimumValidationWithSignedInteger(unittest.TestCase): - """MinimumValidationWithSignedInteger unit test stubs""" - _configuration = configuration.Configuration() - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - -2, - _configuration=self._configuration - ) - - def test_positive_above_the_minimum_is_valid_passes(self): - # positive above the minimum is valid - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - def test_int_below_the_minimum_is_invalid_fails(self): - # int below the minimum is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - -3, - _configuration=self._configuration - ) - - def test_float_below_the_minimum_is_invalid_fails(self): - # float below the minimum is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - -2.0001, - _configuration=self._configuration - ) - - def test_boundary_point_with_float_is_valid_passes(self): - # boundary point with float is valid - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - -2.0, - _configuration=self._configuration - ) - - def test_negative_above_the_minimum_is_valid_passes(self): - # negative above the minimum is valid - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - -1, - _configuration=self._configuration - ) - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - MinimumValidationWithSignedInteger.from_openapi_data_oapg( - "x", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minitems_validation.py deleted file mode 100644 index db5bb4eea03..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minitems_validation.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.minitems_validation import MinitemsValidation -from unit_test_api import configuration - - -class TestMinitemsValidation(unittest.TestCase): - """MinitemsValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_too_short_is_invalid_fails(self): - # too short is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinitemsValidation.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_ignores_non_arrays_passes(self): - # ignores non-arrays - MinitemsValidation.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_longer_is_valid_passes(self): - # longer is valid - MinitemsValidation.from_openapi_data_oapg( - [ - 1, - 2, - ], - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MinitemsValidation.from_openapi_data_oapg( - [ - 1, - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minlength_validation.py deleted file mode 100644 index e7327d1a4d6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minlength_validation.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.minlength_validation import MinlengthValidation -from unit_test_api import configuration - - -class TestMinlengthValidation(unittest.TestCase): - """MinlengthValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_too_short_is_invalid_fails(self): - # too short is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinlengthValidation.from_openapi_data_oapg( - "f", - _configuration=self._configuration - ) - - def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): - # one supplementary Unicode code point is not long enough - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinlengthValidation.from_openapi_data_oapg( - "💩", - _configuration=self._configuration - ) - - def test_longer_is_valid_passes(self): - # longer is valid - MinlengthValidation.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_ignores_non_strings_passes(self): - # ignores non-strings - MinlengthValidation.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MinlengthValidation.from_openapi_data_oapg( - "fo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minproperties_validation.py deleted file mode 100644 index 6d79810b1d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_minproperties_validation.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from unit_test_api import configuration - - -class TestMinpropertiesValidation(unittest.TestCase): - """MinpropertiesValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_ignores_arrays_passes(self): - # ignores arrays - MinpropertiesValidation.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - MinpropertiesValidation.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_too_short_is_invalid_fails(self): - # too short is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - MinpropertiesValidation.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_ignores_strings_passes(self): - # ignores strings - MinpropertiesValidation.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_longer_is_valid_passes(self): - # longer is valid - MinpropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_exact_length_is_valid_passes(self): - # exact length is valid - MinpropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_model_not.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_model_not.py deleted file mode 100644 index 996812828d1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_model_not.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.model_not import ModelNot -from unit_test_api import configuration - - -class TestModelNot(unittest.TestCase): - """ModelNot unit test stubs""" - _configuration = configuration.Configuration() - - def test_allowed_passes(self): - # allowed - ModelNot.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_disallowed_fails(self): - # disallowed - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ModelNot.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_allof_to_check_validation_semantics.py deleted file mode 100644 index 7919e40463c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_allof_to_check_validation_semantics.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from unit_test_api import configuration - - -class TestNestedAllofToCheckValidationSemantics(unittest.TestCase): - """NestedAllofToCheckValidationSemantics unit test stubs""" - _configuration = configuration.Configuration() - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedAllofToCheckValidationSemantics.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - def test_null_is_valid_passes(self): - # null is valid - NestedAllofToCheckValidationSemantics.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_anyof_to_check_validation_semantics.py deleted file mode 100644 index 2be0dd8edae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_anyof_to_check_validation_semantics.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from unit_test_api import configuration - - -class TestNestedAnyofToCheckValidationSemantics(unittest.TestCase): - """NestedAnyofToCheckValidationSemantics unit test stubs""" - _configuration = configuration.Configuration() - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedAnyofToCheckValidationSemantics.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - def test_null_is_valid_passes(self): - # null is valid - NestedAnyofToCheckValidationSemantics.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_items.py deleted file mode 100644 index 273f27f8b7e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_items.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.nested_items import NestedItems -from unit_test_api import configuration - - -class TestNestedItems(unittest.TestCase): - """NestedItems unit test stubs""" - _configuration = configuration.Configuration() - - def test_valid_nested_array_passes(self): - # valid nested array - NestedItems.from_openapi_data_oapg( - [ - [ - [ - [ - 1, - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ], - _configuration=self._configuration - ) - - def test_nested_array_with_invalid_type_fails(self): - # nested array with invalid type - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedItems.from_openapi_data_oapg( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ], - _configuration=self._configuration - ) - - def test_not_deep_enough_fails(self): - # not deep enough - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedItems.from_openapi_data_oapg( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_oneof_to_check_validation_semantics.py deleted file mode 100644 index 80f80e3ec49..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nested_oneof_to_check_validation_semantics.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api import configuration - - -class TestNestedOneofToCheckValidationSemantics(unittest.TestCase): - """NestedOneofToCheckValidationSemantics unit test stubs""" - _configuration = configuration.Configuration() - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NestedOneofToCheckValidationSemantics.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - def test_null_is_valid_passes(self): - # null is valid - NestedOneofToCheckValidationSemantics.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_not_more_complex_schema.py deleted file mode 100644 index 38acbc0e04b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_not_more_complex_schema.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema -from unit_test_api import configuration - - -class TestNotMoreComplexSchema(unittest.TestCase): - """NotMoreComplexSchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_other_match_passes(self): - # other match - NotMoreComplexSchema.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - def test_mismatch_fails(self): - # mismatch - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NotMoreComplexSchema.from_openapi_data_oapg( - { - "foo": - "bar", - }, - _configuration=self._configuration - ) - - def test_match_passes(self): - # match - NotMoreComplexSchema.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nul_characters_in_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nul_characters_in_strings.py deleted file mode 100644 index c5bbe098599..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_nul_characters_in_strings.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from unit_test_api import configuration - - -class TestNulCharactersInStrings(unittest.TestCase): - """NulCharactersInStrings unit test stubs""" - _configuration = configuration.Configuration() - - def test_match_string_with_nul_passes(self): - # match string with nul - NulCharactersInStrings.from_openapi_data_oapg( - "hello\x00there", - _configuration=self._configuration - ) - - def test_do_not_match_string_lacking_nul_fails(self): - # do not match string lacking nul - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NulCharactersInStrings.from_openapi_data_oapg( - "hellothere", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_null_type_matches_only_the_null_object.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_null_type_matches_only_the_null_object.py deleted file mode 100644 index be22b3587ca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_null_type_matches_only_the_null_object.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -from unit_test_api import configuration - - -class TestNullTypeMatchesOnlyTheNullObject(unittest.TestCase): - """NullTypeMatchesOnlyTheNullObject unit test stubs""" - _configuration = configuration.Configuration() - - def test_a_float_is_not_null_fails(self): - # a float is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_an_object_is_not_null_fails(self): - # an object is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_false_is_not_null_fails(self): - # false is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_an_integer_is_not_null_fails(self): - # an integer is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_true_is_not_null_fails(self): - # true is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_zero_is_not_null_fails(self): - # zero is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - 0, - _configuration=self._configuration - ) - - def test_an_empty_string_is_not_null_fails(self): - # an empty string is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_null_is_null_passes(self): - # null is null - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_an_array_is_not_null_fails(self): - # an array is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_a_string_is_not_null_fails(self): - # a string is not null - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NullTypeMatchesOnlyTheNullObject.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_number_type_matches_numbers.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_number_type_matches_numbers.py deleted file mode 100644 index 2070edb70c8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_number_type_matches_numbers.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers -from unit_test_api import configuration - - -class TestNumberTypeMatchesNumbers(unittest.TestCase): - """NumberTypeMatchesNumbers unit test stubs""" - _configuration = configuration.Configuration() - - def test_an_array_is_not_a_number_fails(self): - # an array is not a number - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_null_is_not_a_number_fails(self): - # null is not a number - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_an_object_is_not_a_number_fails(self): - # an object is not a number - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_a_boolean_is_not_a_number_fails(self): - # a boolean is not a number - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_a_float_is_a_number_passes(self): - # a float is a number - NumberTypeMatchesNumbers.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): - # a string is still not a number, even if it looks like one - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - "1", - _configuration=self._configuration - ) - - def test_a_string_is_not_a_number_fails(self): - # a string is not a number - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - NumberTypeMatchesNumbers.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_an_integer_is_a_number_passes(self): - # an integer is a number - NumberTypeMatchesNumbers.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(self): - # a float with zero fractional part is a number (and an integer) - NumberTypeMatchesNumbers.from_openapi_data_oapg( - 1.0, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py deleted file mode 100644 index d833889d0e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_object_properties_validation.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from unit_test_api import configuration - - -class TestObjectPropertiesValidation(unittest.TestCase): - """ObjectPropertiesValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_doesnt_invalidate_other_properties_passes(self): - # doesn't invalidate other properties - ObjectPropertiesValidation.from_openapi_data_oapg( - { - "quux": - [ - ], - }, - _configuration=self._configuration - ) - - def test_ignores_arrays_passes(self): - # ignores arrays - ObjectPropertiesValidation.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - ObjectPropertiesValidation.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_one_property_invalid_is_invalid_fails(self): - # one property invalid is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectPropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - { - }, - }, - _configuration=self._configuration - ) - - def test_both_properties_present_and_valid_is_valid_passes(self): - # both properties present and valid is valid - ObjectPropertiesValidation.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - "baz", - }, - _configuration=self._configuration - ) - - def test_both_properties_invalid_is_invalid_fails(self): - # both properties invalid is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - ObjectPropertiesValidation.from_openapi_data_oapg( - { - "foo": - [ - ], - "bar": - { - }, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof.py deleted file mode 100644 index c23316082f8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.oneof import Oneof -from unit_test_api import configuration - - -class TestOneof(unittest.TestCase): - """Oneof unit test stubs""" - _configuration = configuration.Configuration() - - def test_second_oneof_valid_passes(self): - # second oneOf valid - Oneof.from_openapi_data_oapg( - 2.5, - _configuration=self._configuration - ) - - def test_both_oneof_valid_fails(self): - # both oneOf valid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Oneof.from_openapi_data_oapg( - 3, - _configuration=self._configuration - ) - - def test_first_oneof_valid_passes(self): - # first oneOf valid - Oneof.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_neither_oneof_valid_fails(self): - # neither oneOf valid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - Oneof.from_openapi_data_oapg( - 1.5, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_complex_types.py deleted file mode 100644 index f577d4cfa75..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_complex_types.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from unit_test_api import configuration - - -class TestOneofComplexTypes(unittest.TestCase): - """OneofComplexTypes unit test stubs""" - _configuration = configuration.Configuration() - - def test_first_oneof_valid_complex_passes(self): - # first oneOf valid (complex) - OneofComplexTypes.from_openapi_data_oapg( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_neither_oneof_valid_complex_fails(self): - # neither oneOf valid (complex) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofComplexTypes.from_openapi_data_oapg( - { - "foo": - 2, - "bar": - "quux", - }, - _configuration=self._configuration - ) - - def test_both_oneof_valid_complex_fails(self): - # both oneOf valid (complex) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofComplexTypes.from_openapi_data_oapg( - { - "foo": - "baz", - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_second_oneof_valid_complex_passes(self): - # second oneOf valid (complex) - OneofComplexTypes.from_openapi_data_oapg( - { - "foo": - "baz", - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_base_schema.py deleted file mode 100644 index a1662542c13..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_base_schema.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from unit_test_api import configuration - - -class TestOneofWithBaseSchema(unittest.TestCase): - """OneofWithBaseSchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_both_oneof_valid_fails(self): - # both oneOf valid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithBaseSchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithBaseSchema.from_openapi_data_oapg( - 3, - _configuration=self._configuration - ) - - def test_one_oneof_valid_passes(self): - # one oneOf valid - OneofWithBaseSchema.from_openapi_data_oapg( - "foobar", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_empty_schema.py deleted file mode 100644 index ad3cd286186..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_empty_schema.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from unit_test_api import configuration - - -class TestOneofWithEmptySchema(unittest.TestCase): - """OneofWithEmptySchema unit test stubs""" - _configuration = configuration.Configuration() - - def test_both_valid_invalid_fails(self): - # both valid - invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithEmptySchema.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - def test_one_valid_valid_passes(self): - # one valid - valid - OneofWithEmptySchema.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_required.py deleted file mode 100644 index 5c8132375d6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_oneof_with_required.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.oneof_with_required import OneofWithRequired -from unit_test_api import configuration - - -class TestOneofWithRequired(unittest.TestCase): - """OneofWithRequired unit test stubs""" - _configuration = configuration.Configuration() - - def test_both_valid_invalid_fails(self): - # both valid - invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithRequired.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - }, - _configuration=self._configuration - ) - - def test_both_invalid_invalid_fails(self): - # both invalid - invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - OneofWithRequired.from_openapi_data_oapg( - { - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_first_valid_valid_passes(self): - # first valid - valid - OneofWithRequired.from_openapi_data_oapg( - { - "foo": - 1, - "bar": - 2, - }, - _configuration=self._configuration - ) - - def test_second_valid_valid_passes(self): - # second valid - valid - OneofWithRequired.from_openapi_data_oapg( - { - "foo": - 1, - "baz": - 3, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_is_not_anchored.py deleted file mode 100644 index 42f533b9013..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_is_not_anchored.py +++ /dev/null @@ -1,32 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from unit_test_api import configuration - - -class TestPatternIsNotAnchored(unittest.TestCase): - """PatternIsNotAnchored unit test stubs""" - _configuration = configuration.Configuration() - - def test_matches_a_substring_passes(self): - # matches a substring - PatternIsNotAnchored.from_openapi_data_oapg( - "xxaayy", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_validation.py deleted file mode 100644 index 60cb2e1a1c7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_pattern_validation.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.pattern_validation import PatternValidation -from unit_test_api import configuration - - -class TestPatternValidation(unittest.TestCase): - """PatternValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_ignores_arrays_passes(self): - # ignores arrays - PatternValidation.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_ignores_objects_passes(self): - # ignores objects - PatternValidation.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_ignores_null_passes(self): - # ignores null - PatternValidation.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_ignores_floats_passes(self): - # ignores floats - PatternValidation.from_openapi_data_oapg( - 1.0, - _configuration=self._configuration - ) - - def test_a_non_matching_pattern_is_invalid_fails(self): - # a non-matching pattern is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PatternValidation.from_openapi_data_oapg( - "abc", - _configuration=self._configuration - ) - - def test_ignores_booleans_passes(self): - # ignores booleans - PatternValidation.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_a_matching_pattern_is_valid_passes(self): - # a matching pattern is valid - PatternValidation.from_openapi_data_oapg( - "aaa", - _configuration=self._configuration - ) - - def test_ignores_integers_passes(self): - # ignores integers - PatternValidation.from_openapi_data_oapg( - 123, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_properties_with_escaped_characters.py deleted file mode 100644 index 9cef87212dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_properties_with_escaped_characters.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from unit_test_api import configuration - - -class TestPropertiesWithEscapedCharacters(unittest.TestCase): - """PropertiesWithEscapedCharacters unit test stubs""" - _configuration = configuration.Configuration() - - def test_object_with_all_numbers_is_valid_passes(self): - # object with all numbers is valid - PropertiesWithEscapedCharacters.from_openapi_data_oapg( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - }, - _configuration=self._configuration - ) - - def test_object_with_strings_is_invalid_fails(self): - # object with strings is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PropertiesWithEscapedCharacters.from_openapi_data_oapg( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_property_named_ref_that_is_not_a_reference.py deleted file mode 100644 index 52809d26e4d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_property_named_ref_that_is_not_a_reference.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api import configuration - - -class TestPropertyNamedRefThatIsNotAReference(unittest.TestCase): - """PropertyNamedRefThatIsNotAReference unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - PropertyNamedRefThatIsNotAReference.from_openapi_data_oapg( - { - "$ref": - "a", - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - PropertyNamedRefThatIsNotAReference.from_openapi_data_oapg( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_additionalproperties.py deleted file mode 100644 index db4bc26bbba..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_additionalproperties.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api import configuration - - -class TestRefInAdditionalproperties(unittest.TestCase): - """RefInAdditionalproperties unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInAdditionalproperties.from_openapi_data_oapg( - { - "someProp": - { - "$ref": - "a", - }, - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAdditionalproperties.from_openapi_data_oapg( - { - "someProp": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_allof.py deleted file mode 100644 index 66ff7e5cdcf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_allof.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_allof import RefInAllof -from unit_test_api import configuration - - -class TestRefInAllof(unittest.TestCase): - """RefInAllof unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInAllof.from_openapi_data_oapg( - { - "$ref": - "a", - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAllof.from_openapi_data_oapg( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_anyof.py deleted file mode 100644 index ddf20866766..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_anyof.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_anyof import RefInAnyof -from unit_test_api import configuration - - -class TestRefInAnyof(unittest.TestCase): - """RefInAnyof unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInAnyof.from_openapi_data_oapg( - { - "$ref": - "a", - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInAnyof.from_openapi_data_oapg( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_items.py deleted file mode 100644 index 4f39d31763b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_items.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_items import RefInItems -from unit_test_api import configuration - - -class TestRefInItems(unittest.TestCase): - """RefInItems unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInItems.from_openapi_data_oapg( - [ - { - "$ref": - "a", - }, - ], - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInItems.from_openapi_data_oapg( - [ - { - "$ref": - 2, - }, - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_not.py deleted file mode 100644 index c33378cd279..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_not.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_not import RefInNot -from unit_test_api import configuration - - -class TestRefInNot(unittest.TestCase): - """RefInNot unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInNot.from_openapi_data_oapg( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInNot.from_openapi_data_oapg( - { - "$ref": - "a", - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_oneof.py deleted file mode 100644 index f21623c8d8d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_oneof.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_oneof import RefInOneof -from unit_test_api import configuration - - -class TestRefInOneof(unittest.TestCase): - """RefInOneof unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInOneof.from_openapi_data_oapg( - { - "$ref": - "a", - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInOneof.from_openapi_data_oapg( - { - "$ref": - 2, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_property.py deleted file mode 100644 index 38113b134fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_ref_in_property.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.ref_in_property import RefInProperty -from unit_test_api import configuration - - -class TestRefInProperty(unittest.TestCase): - """RefInProperty unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - RefInProperty.from_openapi_data_oapg( - { - "a": - { - "$ref": - "a", - }, - }, - _configuration=self._configuration - ) - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RefInProperty.from_openapi_data_oapg( - { - "a": - { - "$ref": - 2, - }, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_default_validation.py deleted file mode 100644 index 839aa6742db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_default_validation.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from unit_test_api import configuration - - -class TestRequiredDefaultValidation(unittest.TestCase): - """RequiredDefaultValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_not_required_by_default_passes(self): - # not required by default - RequiredDefaultValidation.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_validation.py deleted file mode 100644 index 9f1f18cc6ac..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_validation.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.required_validation import RequiredValidation -from unit_test_api import configuration - - -class TestRequiredValidation(unittest.TestCase): - """RequiredValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_ignores_arrays_passes(self): - # ignores arrays - RequiredValidation.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_present_required_property_is_valid_passes(self): - # present required property is valid - RequiredValidation.from_openapi_data_oapg( - { - "foo": - 1, - }, - _configuration=self._configuration - ) - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - RequiredValidation.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_ignores_strings_passes(self): - # ignores strings - RequiredValidation.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_non_present_required_property_is_invalid_fails(self): - # non-present required property is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RequiredValidation.from_openapi_data_oapg( - { - "bar": - 1, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_empty_array.py deleted file mode 100644 index 8a42ce63bac..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_empty_array.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from unit_test_api import configuration - - -class TestRequiredWithEmptyArray(unittest.TestCase): - """RequiredWithEmptyArray unit test stubs""" - _configuration = configuration.Configuration() - - def test_property_not_required_passes(self): - # property not required - RequiredWithEmptyArray.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_escaped_characters.py deleted file mode 100644 index bd327f0981f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_required_with_escaped_characters.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters -from unit_test_api import configuration - - -class TestRequiredWithEscapedCharacters(unittest.TestCase): - """RequiredWithEscapedCharacters unit test stubs""" - _configuration = configuration.Configuration() - - def test_object_with_some_properties_missing_is_invalid_fails(self): - # object with some properties missing is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - RequiredWithEscapedCharacters.from_openapi_data_oapg( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - }, - _configuration=self._configuration - ) - - def test_object_with_all_properties_present_is_valid_passes(self): - # object with all properties present is valid - RequiredWithEscapedCharacters.from_openapi_data_oapg( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_simple_enum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_simple_enum_validation.py deleted file mode 100644 index 76658126189..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_simple_enum_validation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from unit_test_api import configuration - - -class TestSimpleEnumValidation(unittest.TestCase): - """SimpleEnumValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_something_else_is_invalid_fails(self): - # something else is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - SimpleEnumValidation.from_openapi_data_oapg( - 4, - _configuration=self._configuration - ) - - def test_one_of_the_enum_is_valid_passes(self): - # one of the enum is valid - SimpleEnumValidation.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_string_type_matches_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_string_type_matches_strings.py deleted file mode 100644 index a1990db3021..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_string_type_matches_strings.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings -from unit_test_api import configuration - - -class TestStringTypeMatchesStrings(unittest.TestCase): - """StringTypeMatchesStrings unit test stubs""" - _configuration = configuration.Configuration() - - def test_1_is_not_a_string_fails(self): - # 1 is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - 1, - _configuration=self._configuration - ) - - def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): - # a string is still a string, even if it looks like a number - StringTypeMatchesStrings.from_openapi_data_oapg( - "1", - _configuration=self._configuration - ) - - def test_an_empty_string_is_still_a_string_passes(self): - # an empty string is still a string - StringTypeMatchesStrings.from_openapi_data_oapg( - "", - _configuration=self._configuration - ) - - def test_a_float_is_not_a_string_fails(self): - # a float is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - 1.1, - _configuration=self._configuration - ) - - def test_an_object_is_not_a_string_fails(self): - # an object is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_an_array_is_not_a_string_fails(self): - # an array is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_a_boolean_is_not_a_string_fails(self): - # a boolean is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - True, - _configuration=self._configuration - ) - - def test_null_is_not_a_string_fails(self): - # null is not a string - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - StringTypeMatchesStrings.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - def test_a_string_is_a_string_passes(self): - # a string is a string - StringTypeMatchesStrings.from_openapi_data_oapg( - "foo", - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py deleted file mode 100644 index d3ab488aa50..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from unit_test_api import configuration - - -class TestTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing(unittest.TestCase): - """TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing unit test stubs""" - _configuration = configuration.Configuration() - - def test_missing_properties_are_not_filled_in_with_the_default_passes(self): - # missing properties are not filled in with the default - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(self): - # an explicit property value is checked against maximum (passing) - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_oapg( - { - "alpha": - 1, - }, - _configuration=self._configuration - ) - - def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(self): - # an explicit property value is checked against maximum (failing) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing.from_openapi_data_oapg( - { - "alpha": - 5, - }, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_false_validation.py deleted file mode 100644 index cda8f767328..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_false_validation.py +++ /dev/null @@ -1,246 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from unit_test_api import configuration - - -class TestUniqueitemsFalseValidation(unittest.TestCase): - """UniqueitemsFalseValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_non_unique_array_of_integers_is_valid_passes(self): - # non-unique array of integers is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 1, - 1, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_objects_is_valid_passes(self): - # unique array of objects is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_nested_objects_is_valid_passes(self): - # non-unique array of nested objects is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_objects_is_valid_passes(self): - # non-unique array of objects is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ], - _configuration=self._configuration - ) - - def test_1_and_true_are_unique_passes(self): - # 1 and true are unique - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 1, - True, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_integers_is_valid_passes(self): - # unique array of integers is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 1, - 2, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_arrays_is_valid_passes(self): - # non-unique array of arrays is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - [ - "foo", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - - def test_numbers_are_unique_if_mathematically_unequal_passes(self): - # numbers are unique if mathematically unequal - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 1.0, - 1.0, - 1, - ], - _configuration=self._configuration - ) - - def test_false_is_not_equal_to_zero_passes(self): - # false is not equal to zero - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 0, - False, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_nested_objects_is_valid_passes(self): - # unique array of nested objects is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ], - _configuration=self._configuration - ) - - def test_0_and_false_are_unique_passes(self): - # 0 and false are unique - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 0, - False, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_arrays_is_valid_passes(self): - # unique array of arrays is valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - [ - "foo", - ], - [ - "bar", - ], - ], - _configuration=self._configuration - ) - - def test_true_is_not_equal_to_one_passes(self): - # true is not equal to one - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - 1, - True, - ], - _configuration=self._configuration - ) - - def test_non_unique_heterogeneous_types_are_valid_passes(self): - # non-unique heterogeneous types are valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ], - _configuration=self._configuration - ) - - def test_unique_heterogeneous_types_are_valid_passes(self): - # unique heterogeneous types are valid - UniqueitemsFalseValidation.from_openapi_data_oapg( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_validation.py deleted file mode 100644 index 819beed3070..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uniqueitems_validation.py +++ /dev/null @@ -1,427 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from unit_test_api import configuration - - -class TestUniqueitemsValidation(unittest.TestCase): - """UniqueitemsValidation unit test stubs""" - _configuration = configuration.Configuration() - - def test_unique_array_of_objects_is_valid_passes(self): - # unique array of objects is valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ], - _configuration=self._configuration - ) - - def test_a_true_and_a1_are_unique_passes(self): - # {"a": true} and {"a": 1} are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "a": - True, - }, - { - "a": - 1, - }, - ], - _configuration=self._configuration - ) - - def test_non_unique_heterogeneous_types_are_invalid_fails(self): - # non-unique heterogeneous types are invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ], - _configuration=self._configuration - ) - - def test_nested0_and_false_are_unique_passes(self): - # nested [0] and [false] are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - [ - 0, - ], - "foo", - ], - [ - [ - False, - ], - "foo", - ], - ], - _configuration=self._configuration - ) - - def test_a_false_and_a0_are_unique_passes(self): - # {"a": false} and {"a": 0} are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "a": - False, - }, - { - "a": - 0, - }, - ], - _configuration=self._configuration - ) - - def test_numbers_are_unique_if_mathematically_unequal_fails(self): - # numbers are unique if mathematically unequal - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - 1.0, - 1.0, - 1, - ], - _configuration=self._configuration - ) - - def test_false_is_not_equal_to_zero_passes(self): - # false is not equal to zero - UniqueitemsValidation.from_openapi_data_oapg( - [ - 0, - False, - ], - _configuration=self._configuration - ) - - def test_0_and_false_are_unique_passes(self): - # [0] and [false] are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - 0, - ], - [ - False, - ], - ], - _configuration=self._configuration - ) - - def test_unique_array_of_arrays_is_valid_passes(self): - # unique array of arrays is valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - "foo", - ], - [ - "bar", - ], - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_nested_objects_is_invalid_fails(self): - # non-unique array of nested objects is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): - # non-unique array of more than two integers is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - 1, - 2, - 1, - ], - _configuration=self._configuration - ) - - def test_true_is_not_equal_to_one_passes(self): - # true is not equal to one - UniqueitemsValidation.from_openapi_data_oapg( - [ - 1, - True, - ], - _configuration=self._configuration - ) - - def test_objects_are_non_unique_despite_key_order_fails(self): - # objects are non-unique despite key order - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_strings_is_valid_passes(self): - # unique array of strings is valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - "foo", - "bar", - "baz", - ], - _configuration=self._configuration - ) - - def test_1_and_true_are_unique_passes(self): - # [1] and [true] are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - 1, - ], - [ - True, - ], - ], - _configuration=self._configuration - ) - - def test_different_objects_are_unique_passes(self): - # different objects are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "a": - 1, - "b": - 2, - }, - { - "a": - 2, - "b": - 1, - }, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_integers_is_valid_passes(self): - # unique array of integers is valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - 1, - 2, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): - # non-unique array of more than two arrays is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_objects_is_invalid_fails(self): - # non-unique array of objects is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ], - _configuration=self._configuration - ) - - def test_unique_array_of_nested_objects_is_valid_passes(self): - # unique array of nested objects is valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_arrays_is_invalid_fails(self): - # non-unique array of arrays is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - "foo", - ], - [ - "foo", - ], - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_strings_is_invalid_fails(self): - # non-unique array of strings is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - "foo", - "bar", - "foo", - ], - _configuration=self._configuration - ) - - def test_nested1_and_true_are_unique_passes(self): - # nested [1] and [true] are unique - UniqueitemsValidation.from_openapi_data_oapg( - [ - [ - [ - 1, - ], - "foo", - ], - [ - [ - True, - ], - "foo", - ], - ], - _configuration=self._configuration - ) - - def test_unique_heterogeneous_types_are_valid_passes(self): - # unique heterogeneous types are valid - UniqueitemsValidation.from_openapi_data_oapg( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - "{}", - ], - _configuration=self._configuration - ) - - def test_non_unique_array_of_integers_is_invalid_fails(self): - # non-unique array of integers is invalid - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - UniqueitemsValidation.from_openapi_data_oapg( - [ - 1, - 1, - ], - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_format.py deleted file mode 100644 index b44051e385c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.uri_format import UriFormat -from unit_test_api import configuration - - -class TestUriFormat(unittest.TestCase): - """UriFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - UriFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - UriFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - UriFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - UriFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - UriFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - UriFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_reference_format.py deleted file mode 100644 index 4feeaca2787..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_reference_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.uri_reference_format import UriReferenceFormat -from unit_test_api import configuration - - -class TestUriReferenceFormat(unittest.TestCase): - """UriReferenceFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - UriReferenceFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - UriReferenceFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - UriReferenceFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - UriReferenceFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - UriReferenceFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - UriReferenceFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_template_format.py deleted file mode 100644 index a3e1e2f9876..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_models/test_uri_template_format.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import unit_test_api -from unit_test_api.model.uri_template_format import UriTemplateFormat -from unit_test_api import configuration - - -class TestUriTemplateFormat(unittest.TestCase): - """UriTemplateFormat unit test stubs""" - _configuration = configuration.Configuration() - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - UriTemplateFormat.from_openapi_data_oapg( - { - }, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - UriTemplateFormat.from_openapi_data_oapg( - False, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - UriTemplateFormat.from_openapi_data_oapg( - 12, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - UriTemplateFormat.from_openapi_data_oapg( - 13.7, - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - UriTemplateFormat.from_openapi_data_oapg( - [ - ], - _configuration=self._configuration - ) - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - UriTemplateFormat.from_openapi_data_oapg( - None, - _configuration=self._configuration - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/__init__.py deleted file mode 100644 index 1309632d3d5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -import json -import typing - -import urllib3 -from urllib3._collections import HTTPHeaderDict - - -class ApiTestMixin: - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = None, - accept_content_type: typing.Optional[str] = None, - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py deleted file mode 100644 index 1ec438f9e0b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/test_post.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_no_additional_properties_is_valid_passes(self): - content_type = 'application/json' - # no additional properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_additional_invalid_property_is_invalid_fails(self): - content_type = 'application/json' - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_additional_valid_property_is_valid_passes(self): - content_type = 'application/json' - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py deleted file mode 100644 index 51206546a3e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_are_allowed_by_default_request_body/test_post.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_additional_properties_are_allowed_passes(self): - content_type = 'application/json' - # additional properties are allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py deleted file mode 100644 index 6ef684d7aaa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_can_exist_by_itself_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_an_additional_invalid_property_is_invalid_fails(self): - content_type = 'application/json' - # an additional invalid property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_additional_valid_property_is_valid_passes(self): - content_type = 'application/json' - # an additional valid property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - True, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py deleted file mode 100644 index b8eadc2525f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_additionalproperties_should_not_look_in_applicators_request_body/test_post.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_properties_defined_in_allof_are_not_examined_fails(self): - content_type = 'application/json' - # properties defined in allOf are not examined - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - True, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_valid_test_case_passes(self): - content_type = 'application/json' - # valid test case - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - False, - "bar": - True, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py deleted file mode 100644 index d1c7dc21251..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_combined_with_anyof_oneof_request_body/test_post.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofCombinedWithAnyofOneofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofCombinedWithAnyofOneofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_allof_true_anyof_false_oneof_false_fails(self): - content_type = 'application/json' - # allOf: true, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_false_anyof_false_oneof_true_fails(self): - content_type = 'application/json' - # allOf: false, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_false_anyof_true_oneof_true_fails(self): - content_type = 'application/json' - # allOf: false, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 15 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_true_anyof_true_oneof_false_fails(self): - content_type = 'application/json' - # allOf: true, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_true_anyof_true_oneof_true_passes(self): - content_type = 'application/json' - # allOf: true, anyOf: true, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 30 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofCombinedWithAnyofOneofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_allof_true_anyof_false_oneof_true_fails(self): - content_type = 'application/json' - # allOf: true, anyOf: false, oneOf: true - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 10 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_false_anyof_true_oneof_false_fails(self): - content_type = 'application/json' - # allOf: false, anyOf: true, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_allof_false_anyof_false_oneof_false_fails(self): - content_type = 'application/json' - # allOf: false, anyOf: false, oneOf: false - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py deleted file mode 100644 index b5b226da396..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_request_body/test_post.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_allof_passes(self): - content_type = 'application/json' - # allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_mismatch_first_fails(self): - content_type = 'application/json' - # mismatch first - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_second_fails(self): - content_type = 'application/json' - # mismatch second - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_wrong_type_fails(self): - content_type = 'application/json' - # wrong type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py deleted file mode 100644 index 9bc320bd602..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_simple_types_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_simple_types_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofSimpleTypesRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofSimpleTypesRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_valid_passes(self): - content_type = 'application/json' - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 25 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofSimpleTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_mismatch_one_fails(self): - content_type = 'application/json' - # mismatch one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py deleted file mode 100644 index b9cbf295229..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_base_schema_request_body/test_post.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofWithBaseSchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofWithBaseSchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_valid_passes(self): - content_type = 'application/json' - # valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "bar": - 2, - "baz": - None, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithBaseSchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_mismatch_first_allof_fails(self): - content_type = 'application/json' - # mismatch first allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_base_schema_fails(self): - content_type = 'application/json' - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "baz": - None, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_both_fails(self): - content_type = 'application/json' - # mismatch both - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_second_allof_fails(self): - content_type = 'application/json' - # mismatch second allOf - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py deleted file mode 100644 index 908bd1ca7ba..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_one_empty_schema_request_body/test_post.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofWithOneEmptySchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofWithOneEmptySchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_any_data_is_valid_passes(self): - content_type = 'application/json' - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithOneEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py deleted file mode 100644 index 72bd0bed2be..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_first_empty_schema_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofWithTheFirstEmptySchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_string_is_invalid_fails(self): - content_type = 'application/json' - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_number_is_valid_passes(self): - content_type = 'application/json' - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheFirstEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py deleted file mode 100644 index 46ab77081dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_the_last_empty_schema_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofWithTheLastEmptySchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofWithTheLastEmptySchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_string_is_invalid_fails(self): - content_type = 'application/json' - # string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_number_is_valid_passes(self): - content_type = 'application/json' - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTheLastEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py deleted file mode 100644 index 7457f418182..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_allof_with_two_empty_schemas_request_body/test_post.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAllofWithTwoEmptySchemasRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAllofWithTwoEmptySchemasRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_any_data_is_valid_passes(self): - content_type = 'application/json' - # any data is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAllofWithTwoEmptySchemasRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py deleted file mode 100644 index 2cd85be49f7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_complex_types_request_body/test_post.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAnyofComplexTypesRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAnyofComplexTypesRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_second_anyof_valid_complex_passes(self): - content_type = 'application/json' - # second anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_neither_anyof_valid_complex_fails(self): - content_type = 'application/json' - # neither anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_anyof_valid_complex_passes(self): - content_type = 'application/json' - # both anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_first_anyof_valid_complex_passes(self): - content_type = 'application/json' - # first anyOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofComplexTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py deleted file mode 100644 index 8405d6e3181..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_request_body/test_post.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_anyof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAnyofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAnyofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_second_anyof_valid_passes(self): - content_type = 'application/json' - # second anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.5 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_neither_anyof_valid_fails(self): - content_type = 'application/json' - # neither anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_anyof_valid_passes(self): - content_type = 'application/json' - # both anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_first_anyof_valid_passes(self): - content_type = 'application/json' - # first anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py deleted file mode 100644 index 7db203a0e1c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_base_schema_request_body/test_post.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAnyofWithBaseSchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAnyofWithBaseSchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_one_anyof_valid_passes(self): - content_type = 'application/json' - # one anyOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithBaseSchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_both_anyof_invalid_fails(self): - content_type = 'application/json' - # both anyOf invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_base_schema_fails(self): - content_type = 'application/json' - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py deleted file mode 100644 index 15e0575d87b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_anyof_with_one_empty_schema_request_body/test_post.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostAnyofWithOneEmptySchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostAnyofWithOneEmptySchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_string_is_valid_passes(self): - content_type = 'application/json' - # string is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_number_is_valid_passes(self): - content_type = 'application/json' - # number is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postAnyofWithOneEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py deleted file mode 100644 index 6132d9c26bd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_array_type_matches_arrays_request_body/test_post.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostArrayTypeMatchesArraysRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostArrayTypeMatchesArraysRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_a_float_is_not_an_array_fails(self): - content_type = 'application/json' - # a float is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_boolean_is_not_an_array_fails(self): - content_type = 'application/json' - # a boolean is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_an_array_fails(self): - content_type = 'application/json' - # null is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_object_is_not_an_array_fails(self): - content_type = 'application/json' - # an object is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_not_an_array_fails(self): - content_type = 'application/json' - # a string is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_array_is_an_array_passes(self): - content_type = 'application/json' - # an array is an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postArrayTypeMatchesArraysRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_integer_is_not_an_array_fails(self): - content_type = 'application/json' - # an integer is not an array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py deleted file mode 100644 index 3755adac412..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_boolean_type_matches_booleans_request_body/test_post.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostBooleanTypeMatchesBooleansRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostBooleanTypeMatchesBooleansRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_an_empty_string_is_not_a_boolean_fails(self): - content_type = 'application/json' - # an empty string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_float_is_not_a_boolean_fails(self): - content_type = 'application/json' - # a float is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_a_boolean_fails(self): - content_type = 'application/json' - # null is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_zero_is_not_a_boolean_fails(self): - content_type = 'application/json' - # zero is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_array_is_not_a_boolean_fails(self): - content_type = 'application/json' - # an array is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_not_a_boolean_fails(self): - content_type = 'application/json' - # a string is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_false_is_a_boolean_passes(self): - content_type = 'application/json' - # false is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_integer_is_not_a_boolean_fails(self): - content_type = 'application/json' - # an integer is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_true_is_a_boolean_passes(self): - content_type = 'application/json' - # true is a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBooleanTypeMatchesBooleansRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_object_is_not_a_boolean_fails(self): - content_type = 'application/json' - # an object is not a boolean - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py deleted file mode 100644 index 6792b353533..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_int_request_body/test_post.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_by_int_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostByIntRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostByIntRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_int_by_int_fail_fails(self): - content_type = 'application/json' - # int by int fail - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 7 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_int_by_int_passes(self): - content_type = 'application/json' - # int by int - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 10 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_non_numbers_passes(self): - content_type = 'application/json' - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByIntRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py deleted file mode 100644 index 71cf3827359..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_number_request_body/test_post.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_by_number_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostByNumberRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostByNumberRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_45_is_multiple_of15_passes(self): - content_type = 'application/json' - # 4.5 is multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 4.5 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_35_is_not_multiple_of15_fails(self): - content_type = 'application/json' - # 35 is not multiple of 1.5 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 35 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_zero_is_multiple_of_anything_passes(self): - content_type = 'application/json' - # zero is multiple of anything - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postByNumberRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py deleted file mode 100644 index f16340e5b9b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_by_small_number_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_by_small_number_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostBySmallNumberRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostBySmallNumberRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_000751_is_not_multiple_of00001_fails(self): - content_type = 'application/json' - # 0.00751 is not multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.00751 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_00075_is_multiple_of00001_passes(self): - content_type = 'application/json' - # 0.0075 is multiple of 0.0001 - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0075 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postBySmallNumberRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py deleted file mode 100644 index 51f2f2fd429..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_date_time_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_date_time_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostDateTimeFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostDateTimeFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postDateTimeFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py deleted file mode 100644 index 4d1a472e3b4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_email_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_email_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEmailFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEmailFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEmailFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py deleted file mode 100644 index c58a7e635a9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with0_does_not_match_false_request_body/test_post.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumWith0DoesNotMatchFalseRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_integer_zero_is_valid_passes(self): - content_type = 'application/json' - # integer zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_float_zero_is_valid_passes(self): - content_type = 'application/json' - # float zero is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith0DoesNotMatchFalseRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_false_is_invalid_fails(self): - content_type = 'application/json' - # false is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py deleted file mode 100644 index 837485e2b97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with1_does_not_match_true_request_body/test_post.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumWith1DoesNotMatchTrueRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_true_is_invalid_fails(self): - content_type = 'application/json' - # true is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_integer_one_is_valid_passes(self): - content_type = 'application/json' - # integer one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_float_one_is_valid_passes(self): - content_type = 'application/json' - # float one is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWith1DoesNotMatchTrueRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py deleted file mode 100644 index 2aaa5a405ec..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_escaped_characters_request_body/test_post.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumWithEscapedCharactersRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumWithEscapedCharactersRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_member2_is_valid_passes(self): - content_type = 'application/json' - # member 2 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo\rbar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_member1_is_valid_passes(self): - content_type = 'application/json' - # member 1 is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo\nbar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithEscapedCharactersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_another_string_is_invalid_fails(self): - content_type = 'application/json' - # another string is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py deleted file mode 100644 index f68456be55e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_false_does_not_match0_request_body/test_post.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumWithFalseDoesNotMatch0RequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_false_is_valid_passes(self): - content_type = 'application/json' - # false is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithFalseDoesNotMatch0RequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_float_zero_is_invalid_fails(self): - content_type = 'application/json' - # float zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_integer_zero_is_invalid_fails(self): - content_type = 'application/json' - # integer zero is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py deleted file mode 100644 index 36fc116919a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enum_with_true_does_not_match1_request_body/test_post.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumWithTrueDoesNotMatch1RequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_float_one_is_invalid_fails(self): - content_type = 'application/json' - # float one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_true_is_valid_passes(self): - content_type = 'application/json' - # true is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumWithTrueDoesNotMatch1RequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_integer_one_is_invalid_fails(self): - content_type = 'application/json' - # integer one is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py deleted file mode 100644 index 9244bfd1824..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_enums_in_properties_request_body/test_post.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_enums_in_properties_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostEnumsInPropertiesRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostEnumsInPropertiesRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_missing_optional_property_is_valid_passes(self): - content_type = 'application/json' - # missing optional property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - "bar", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_wrong_foo_value_fails(self): - content_type = 'application/json' - # wrong foo value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foot", - "bar": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_properties_are_valid_passes(self): - content_type = 'application/json' - # both properties are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - "bar": - "bar", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postEnumsInPropertiesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_wrong_bar_value_fails(self): - content_type = 'application/json' - # wrong bar value - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - "bar": - "bart", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_missing_all_properties_is_invalid_fails(self): - content_type = 'application/json' - # missing all properties is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_missing_required_property_is_invalid_fails(self): - content_type = 'application/json' - # missing required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py deleted file mode 100644 index 38f04c4f878..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_forbidden_property_request_body/test_post.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_forbidden_property_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostForbiddenPropertyRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostForbiddenPropertyRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_present_fails(self): - content_type = 'application/json' - # property present - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_property_absent_passes(self): - content_type = 'application/json' - # property absent - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 1, - "baz": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postForbiddenPropertyRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py deleted file mode 100644 index b626fef6e2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_hostname_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_hostname_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostHostnameFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostHostnameFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postHostnameFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py deleted file mode 100644 index d30a2776da4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_integer_type_matches_integers_request_body/test_post.py +++ /dev/null @@ -1,201 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostIntegerTypeMatchesIntegersRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostIntegerTypeMatchesIntegersRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_an_object_is_not_an_integer_fails(self): - content_type = 'application/json' - # an object is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_not_an_integer_fails(self): - content_type = 'application/json' - # a string is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_an_integer_fails(self): - content_type = 'application/json' - # null is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): - content_type = 'application/json' - # a float with zero fractional part is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_float_is_not_an_integer_fails(self): - content_type = 'application/json' - # a float is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_boolean_is_not_an_integer_fails(self): - content_type = 'application/json' - # a boolean is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_integer_is_an_integer_passes(self): - content_type = 'application/json' - # an integer is an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIntegerTypeMatchesIntegersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): - content_type = 'application/json' - # a string is still not an integer, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_array_is_not_an_integer_fails(self): - content_type = 'application/json' - # an array is not an integer - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py deleted file mode 100644 index c2ff2adebed..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails(self): - content_type = 'application/json' - # always invalid, but naive implementations may raise an overflow error - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0E308 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_valid_integer_with_multipleof_float_passes(self): - content_type = 'application/json' - # valid integer with multipleOf float - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123456789 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py deleted file mode 100644 index e3d1edeeee4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_invalid_string_value_for_default_request_body/test_post.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostInvalidStringValueForDefaultRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostInvalidStringValueForDefaultRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_valid_when_property_is_specified_passes(self): - content_type = 'application/json' - # valid when property is specified - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - "good", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_still_valid_when_the_invalid_default_is_used_passes(self): - content_type = 'application/json' - # still valid when the invalid default is used - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postInvalidStringValueForDefaultRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py deleted file mode 100644 index 0c7408ba02f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv4_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ipv4_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostIpv4FormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostIpv4FormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv4FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py deleted file mode 100644 index 19214ebb3ae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ipv6_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ipv6_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostIpv6FormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostIpv6FormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postIpv6FormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py deleted file mode 100644 index ae8f171dd60..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_json_pointer_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_json_pointer_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostJsonPointerFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostJsonPointerFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postJsonPointerFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py deleted file mode 100644 index d16fe2926be..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_request_body/test_post.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maximum_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaximumValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaximumValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_below_the_maximum_is_valid_passes(self): - content_type = 'application/json' - # below the maximum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.6 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_boundary_point_is_valid_passes(self): - content_type = 'application/json' - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_above_the_maximum_is_invalid_fails(self): - content_type = 'application/json' - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_non_numbers_passes(self): - content_type = 'application/json' - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py deleted file mode 100644 index e26b9b2dae7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maximum_validation_with_unsigned_integer_request_body/test_post.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_below_the_maximum_is_invalid_passes(self): - content_type = 'application/json' - # below the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 299.97 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_above_the_maximum_is_invalid_fails(self): - content_type = 'application/json' - # above the maximum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_boundary_point_integer_is_valid_passes(self): - content_type = 'application/json' - # boundary point integer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_boundary_point_float_is_valid_passes(self): - content_type = 'application/json' - # boundary point float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py deleted file mode 100644 index de8c99ca795..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxitems_validation_request_body/test_post.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maxitems_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaxitemsValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaxitemsValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_too_long_is_invalid_fails(self): - content_type = 'application/json' - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 3, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_non_arrays_passes(self): - content_type = 'application/json' - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_shorter_is_valid_passes(self): - content_type = 'application/json' - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py deleted file mode 100644 index 8443176e95f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxlength_validation_request_body/test_post.py +++ /dev/null @@ -1,175 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maxlength_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaxlengthValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaxlengthValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_too_long_is_invalid_fails(self): - content_type = 'application/json' - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_non_strings_passes(self): - content_type = 'application/json' - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 100 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_shorter_is_valid_passes(self): - content_type = 'application/json' - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "f" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): - content_type = 'application/json' - # two supplementary Unicode code points is long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "💩💩" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "fo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py deleted file mode 100644 index 53c93f5ba26..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties0_means_the_object_is_empty_request_body/test_post.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_no_properties_is_valid_passes(self): - content_type = 'application/json' - # no properties is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_one_property_is_invalid_fails(self): - content_type = 'application/json' - # one property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py deleted file mode 100644 index 75849461f66..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_maxproperties_validation_request_body/test_post.py +++ /dev/null @@ -1,224 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMaxpropertiesValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMaxpropertiesValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_too_long_is_invalid_fails(self): - content_type = 'application/json' - # too long is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_arrays_passes(self): - content_type = 'application/json' - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 3, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_other_non_objects_passes(self): - content_type = 'application/json' - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_strings_passes(self): - content_type = 'application/json' - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_shorter_is_valid_passes(self): - content_type = 'application/json' - # shorter is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMaxpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py deleted file mode 100644 index b637e0e80af..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_request_body/test_post.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_minimum_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMinimumValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMinimumValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_boundary_point_is_valid_passes(self): - content_type = 'application/json' - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_below_the_minimum_is_invalid_fails(self): - content_type = 'application/json' - # below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.6 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_above_the_minimum_is_valid_passes(self): - content_type = 'application/json' - # above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.6 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_non_numbers_passes(self): - content_type = 'application/json' - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py deleted file mode 100644 index 37dab1a048d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minimum_validation_with_signed_integer_request_body/test_post.py +++ /dev/null @@ -1,219 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMinimumValidationWithSignedIntegerRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMinimumValidationWithSignedIntegerRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_boundary_point_is_valid_passes(self): - content_type = 'application/json' - # boundary point is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_positive_above_the_minimum_is_valid_passes(self): - content_type = 'application/json' - # positive above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_int_below_the_minimum_is_invalid_fails(self): - content_type = 'application/json' - # int below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_float_below_the_minimum_is_invalid_fails(self): - content_type = 'application/json' - # float below the minimum is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2.0001 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_boundary_point_with_float_is_valid_passes(self): - content_type = 'application/json' - # boundary point with float is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_negative_above_the_minimum_is_valid_passes(self): - content_type = 'application/json' - # negative above the minimum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_non_numbers_passes(self): - content_type = 'application/json' - # ignores non-numbers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinimumValidationWithSignedIntegerRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py deleted file mode 100644 index af54b84112b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minitems_validation_request_body/test_post.py +++ /dev/null @@ -1,151 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_minitems_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMinitemsValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMinitemsValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_too_short_is_invalid_fails(self): - content_type = 'application/json' - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_non_arrays_passes(self): - content_type = 'application/json' - # ignores non-arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_longer_is_valid_passes(self): - content_type = 'application/json' - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py deleted file mode 100644 index 1a1db934bba..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minlength_validation_request_body/test_post.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_minlength_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMinlengthValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMinlengthValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_too_short_is_invalid_fails(self): - content_type = 'application/json' - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "f" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): - content_type = 'application/json' - # one supplementary Unicode code point is not long enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "💩" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_longer_is_valid_passes(self): - content_type = 'application/json' - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_non_strings_passes(self): - content_type = 'application/json' - # ignores non-strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "fo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinlengthValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py deleted file mode 100644 index 91341e06d74..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_minproperties_validation_request_body/test_post.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_minproperties_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostMinpropertiesValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostMinpropertiesValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_ignores_arrays_passes(self): - content_type = 'application/json' - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_other_non_objects_passes(self): - content_type = 'application/json' - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_too_short_is_invalid_fails(self): - content_type = 'application/json' - # too short is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_strings_passes(self): - content_type = 'application/json' - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_longer_is_valid_passes(self): - content_type = 'application/json' - # longer is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_exact_length_is_valid_passes(self): - content_type = 'application/json' - # exact length is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postMinpropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py deleted file mode 100644 index 73e992a05f2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_allof_to_check_validation_semantics_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_anything_non_null_is_invalid_fails(self): - content_type = 'application/json' - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_valid_passes(self): - content_type = 'application/json' - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py deleted file mode 100644 index 7951e3c8e8c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_anyof_to_check_validation_semantics_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_anything_non_null_is_invalid_fails(self): - content_type = 'application/json' - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_valid_passes(self): - content_type = 'application/json' - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py deleted file mode 100644 index 60874a6b8ae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_items_request_body/test_post.py +++ /dev/null @@ -1,180 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_nested_items_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNestedItemsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNestedItemsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_valid_nested_array_passes(self): - content_type = 'application/json' - # valid nested array - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - [ - 1, - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedItemsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_nested_array_with_invalid_type_fails(self): - content_type = 'application/json' - # nested array with invalid type - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_not_deep_enough_fails(self): - content_type = 'application/json' - # not deep enough - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py deleted file mode 100644 index 42a97ddac7b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nested_oneof_to_check_validation_semantics_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_anything_non_null_is_invalid_fails(self): - content_type = 'application/json' - # anything non-null is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_valid_passes(self): - content_type = 'application/json' - # null is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py deleted file mode 100644 index eaacac00ebb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_more_complex_schema_request_body/test_post.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNotMoreComplexSchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNotMoreComplexSchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_other_match_passes(self): - content_type = 'application/json' - # other match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_mismatch_fails(self): - content_type = 'application/json' - # mismatch - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "bar", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_match_passes(self): - content_type = 'application/json' - # match - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotMoreComplexSchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py deleted file mode 100644 index c9bd6f3f304..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_not_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_not_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNotRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNotRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_allowed_passes(self): - content_type = 'application/json' - # allowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNotRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_disallowed_fails(self): - content_type = 'application/json' - # disallowed - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py deleted file mode 100644 index 0586243d617..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_nul_characters_in_strings_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNulCharactersInStringsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNulCharactersInStringsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_match_string_with_nul_passes(self): - content_type = 'application/json' - # match string with nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "hello\x00there" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNulCharactersInStringsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_do_not_match_string_lacking_nul_fails(self): - content_type = 'application/json' - # do not match string lacking nul - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "hellothere" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py deleted file mode 100644 index f75a20619fa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_null_type_matches_only_the_null_object_request_body/test_post.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_a_float_is_not_null_fails(self): - content_type = 'application/json' - # a float is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_object_is_not_null_fails(self): - content_type = 'application/json' - # an object is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_false_is_not_null_fails(self): - content_type = 'application/json' - # false is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_integer_is_not_null_fails(self): - content_type = 'application/json' - # an integer is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_true_is_not_null_fails(self): - content_type = 'application/json' - # true is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_zero_is_not_null_fails(self): - content_type = 'application/json' - # zero is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_empty_string_is_not_null_fails(self): - content_type = 'application/json' - # an empty string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_null_passes(self): - content_type = 'application/json' - # null is null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_array_is_not_null_fails(self): - content_type = 'application/json' - # an array is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_not_null_fails(self): - content_type = 'application/json' - # a string is not null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py deleted file mode 100644 index 70284734ef6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_number_type_matches_numbers_request_body/test_post.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostNumberTypeMatchesNumbersRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostNumberTypeMatchesNumbersRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_an_array_is_not_a_number_fails(self): - content_type = 'application/json' - # an array is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_a_number_fails(self): - content_type = 'application/json' - # null is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_object_is_not_a_number_fails(self): - content_type = 'application/json' - # an object is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_boolean_is_not_a_number_fails(self): - content_type = 'application/json' - # a boolean is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_float_is_a_number_passes(self): - content_type = 'application/json' - # a float is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): - content_type = 'application/json' - # a string is still not a number, even if it looks like one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_not_a_number_fails(self): - content_type = 'application/json' - # a string is not a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_integer_is_a_number_passes(self): - content_type = 'application/json' - # an integer is a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(self): - content_type = 'application/json' - # a float with zero fractional part is a number (and an integer) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postNumberTypeMatchesNumbersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py deleted file mode 100644 index adae606aa93..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_properties_validation_request_body/test_post.py +++ /dev/null @@ -1,212 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_object_properties_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostObjectPropertiesValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostObjectPropertiesValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_doesnt_invalidate_other_properties_passes(self): - content_type = 'application/json' - # doesn't invalidate other properties - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "quux": - [ - ], - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_arrays_passes(self): - content_type = 'application/json' - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_other_non_objects_passes(self): - content_type = 'application/json' - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_one_property_invalid_is_invalid_fails(self): - content_type = 'application/json' - # one property invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_properties_present_and_valid_is_valid_passes(self): - content_type = 'application/json' - # both properties present and valid is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - "baz", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectPropertiesValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_both_properties_invalid_is_invalid_fails(self): - content_type = 'application/json' - # both properties invalid is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - [ - ], - "bar": - { - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py deleted file mode 100644 index da5fdf5754b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_object_type_matches_objects_request_body/test_post.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostObjectTypeMatchesObjectsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostObjectTypeMatchesObjectsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_a_float_is_not_an_object_fails(self): - content_type = 'application/json' - # a float is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_an_object_fails(self): - content_type = 'application/json' - # null is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_array_is_not_an_object_fails(self): - content_type = 'application/json' - # an array is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_object_is_an_object_passes(self): - content_type = 'application/json' - # an object is an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postObjectTypeMatchesObjectsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_string_is_not_an_object_fails(self): - content_type = 'application/json' - # a string is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_integer_is_not_an_object_fails(self): - content_type = 'application/json' - # an integer is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_boolean_is_not_an_object_fails(self): - content_type = 'application/json' - # a boolean is not an object - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py deleted file mode 100644 index a786ebf4eb7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_complex_types_request_body/test_post.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostOneofComplexTypesRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostOneofComplexTypesRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_first_oneof_valid_complex_passes(self): - content_type = 'application/json' - # first oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_neither_oneof_valid_complex_fails(self): - content_type = 'application/json' - # neither oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_oneof_valid_complex_fails(self): - content_type = 'application/json' - # both oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_second_oneof_valid_complex_passes(self): - content_type = 'application/json' - # second oneOf valid (complex) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofComplexTypesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py deleted file mode 100644 index 1b837331c1f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_request_body/test_post.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_oneof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostOneofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostOneofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_second_oneof_valid_passes(self): - content_type = 'application/json' - # second oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.5 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_both_oneof_valid_fails(self): - content_type = 'application/json' - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_first_oneof_valid_passes(self): - content_type = 'application/json' - # first oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_neither_oneof_valid_fails(self): - content_type = 'application/json' - # neither oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.5 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py deleted file mode 100644 index 57bc715f62d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_base_schema_request_body/test_post.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostOneofWithBaseSchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostOneofWithBaseSchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_both_oneof_valid_fails(self): - content_type = 'application/json' - # both oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_mismatch_base_schema_fails(self): - content_type = 'application/json' - # mismatch base schema - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_one_oneof_valid_passes(self): - content_type = 'application/json' - # one oneOf valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithBaseSchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py deleted file mode 100644 index 191c9dc3dc2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_empty_schema_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostOneofWithEmptySchemaRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostOneofWithEmptySchemaRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_both_valid_invalid_fails(self): - content_type = 'application/json' - # both valid - invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_one_valid_valid_passes(self): - content_type = 'application/json' - # one valid - valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithEmptySchemaRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py deleted file mode 100644 index 6f01d9c6e51..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_oneof_with_required_request_body/test_post.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_oneof_with_required_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostOneofWithRequiredRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostOneofWithRequiredRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_both_valid_invalid_fails(self): - content_type = 'application/json' - # both valid - invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_both_invalid_invalid_fails(self): - content_type = 'application/json' - # both invalid - invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_first_valid_valid_passes(self): - content_type = 'application/json' - # first valid - valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithRequiredRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_second_valid_valid_passes(self): - content_type = 'application/json' - # second valid - valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "baz": - 3, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postOneofWithRequiredRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py deleted file mode 100644 index 6ec8ce1d92a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_is_not_anchored_request_body/test_post.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostPatternIsNotAnchoredRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostPatternIsNotAnchoredRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_matches_a_substring_passes(self): - content_type = 'application/json' - # matches a substring - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "xxaayy" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternIsNotAnchoredRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py deleted file mode 100644 index e788bd9e21c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_pattern_validation_request_body/test_post.py +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_pattern_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostPatternValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostPatternValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_ignores_arrays_passes(self): - content_type = 'application/json' - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_objects_passes(self): - content_type = 'application/json' - # ignores objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_null_passes(self): - content_type = 'application/json' - # ignores null - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_floats_passes(self): - content_type = 'application/json' - # ignores floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_non_matching_pattern_is_invalid_fails(self): - content_type = 'application/json' - # a non-matching pattern is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "abc" - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_ignores_booleans_passes(self): - content_type = 'application/json' - # ignores booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_matching_pattern_is_valid_passes(self): - content_type = 'application/json' - # a matching pattern is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "aaa" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_integers_passes(self): - content_type = 'application/json' - # ignores integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPatternValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py deleted file mode 100644 index f0ce9cfad28..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_properties_with_escaped_characters_request_body/test_post.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostPropertiesWithEscapedCharactersRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostPropertiesWithEscapedCharactersRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_object_with_all_numbers_is_valid_passes(self): - content_type = 'application/json' - # object with all numbers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertiesWithEscapedCharactersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_object_with_strings_is_invalid_fails(self): - content_type = 'application/json' - # object with strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py deleted file mode 100644 index 486fa4c5ae7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_property_named_ref_that_is_not_a_reference_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py deleted file mode 100644 index eabe92bd69b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_additionalproperties_request_body/test_post.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInAdditionalpropertiesRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInAdditionalpropertiesRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "someProp": - { - "$ref": - "a", - }, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAdditionalpropertiesRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "someProp": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py deleted file mode 100644 index b7aa28e7bd7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_allof_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_allof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInAllofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInAllofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAllofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py deleted file mode 100644 index 517d2427df6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_anyof_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInAnyofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInAnyofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInAnyofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py deleted file mode 100644 index e32c859fc69..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_items_request_body/test_post.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_items_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInItemsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInItemsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "$ref": - "a", - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInItemsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "$ref": - 2, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py deleted file mode 100644 index 2285d7c3b43..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_not_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_not_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInNotRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInNotRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInNotRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py deleted file mode 100644 index 7606a57de91..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_oneof_request_body/test_post.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInOneofRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInOneofRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInOneofRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py deleted file mode 100644 index 7f469264453..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_ref_in_property_request_body/test_post.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_ref_in_property_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRefInPropertyRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRefInPropertyRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_named_ref_valid_passes(self): - content_type = 'application/json' - # property named $ref valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "a": - { - "$ref": - "a", - }, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRefInPropertyRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_property_named_ref_invalid_fails(self): - content_type = 'application/json' - # property named $ref invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "a": - { - "$ref": - 2, - }, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py deleted file mode 100644 index 17a9e08c7a3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_default_validation_request_body/test_post.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_required_default_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRequiredDefaultValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRequiredDefaultValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_not_required_by_default_passes(self): - content_type = 'application/json' - # not required by default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredDefaultValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py deleted file mode 100644 index ab17be30229..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_validation_request_body/test_post.py +++ /dev/null @@ -1,182 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_required_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRequiredValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRequiredValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_ignores_arrays_passes(self): - content_type = 'application/json' - # ignores arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_present_required_property_is_valid_passes(self): - content_type = 'application/json' - # present required property is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_other_non_objects_passes(self): - content_type = 'application/json' - # ignores other non-objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_ignores_strings_passes(self): - content_type = 'application/json' - # ignores strings - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_present_required_property_is_invalid_fails(self): - content_type = 'application/json' - # non-present required property is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 1, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py deleted file mode 100644 index 3e3491d1821..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_empty_array_request_body/test_post.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRequiredWithEmptyArrayRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRequiredWithEmptyArrayRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_property_not_required_passes(self): - content_type = 'application/json' - # property not required - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredWithEmptyArrayRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py deleted file mode 100644 index 607f5368732..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_required_with_escaped_characters_request_body/test_post.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostRequiredWithEscapedCharactersRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostRequiredWithEscapedCharactersRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_object_with_some_properties_missing_is_invalid_fails(self): - content_type = 'application/json' - # object with some properties missing is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_object_with_all_properties_present_is_valid_passes(self): - content_type = 'application/json' - # object with all properties present is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postRequiredWithEscapedCharactersRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py deleted file mode 100644 index a6ee338a7e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_simple_enum_validation_request_body/test_post.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostSimpleEnumValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostSimpleEnumValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_something_else_is_invalid_fails(self): - content_type = 'application/json' - # something else is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 4 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_one_of_the_enum_is_valid_passes(self): - content_type = 'application/json' - # one of the enum is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postSimpleEnumValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py deleted file mode 100644 index 12f1e9bfefc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_string_type_matches_strings_request_body/test_post.py +++ /dev/null @@ -1,217 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostStringTypeMatchesStringsRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostStringTypeMatchesStringsRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_1_is_not_a_string_fails(self): - content_type = 'application/json' - # 1 is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): - content_type = 'application/json' - # a string is still a string, even if it looks like a number - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_empty_string_is_still_a_string_passes(self): - content_type = 'application/json' - # an empty string is still a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_float_is_not_a_string_fails(self): - content_type = 'application/json' - # a float is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_object_is_not_a_string_fails(self): - content_type = 'application/json' - # an object is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_an_array_is_not_a_string_fails(self): - content_type = 'application/json' - # an array is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_boolean_is_not_a_string_fails(self): - content_type = 'application/json' - # a boolean is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_null_is_not_a_string_fails(self): - content_type = 'application/json' - # null is not a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_a_string_is_a_string_passes(self): - content_type = 'application/json' - # a string is a string - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postStringTypeMatchesStringsRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py deleted file mode 100644 index 56ea79de77d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/test_post.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_missing_properties_are_not_filled_in_with_the_default_passes(self): - content_type = 'application/json' - # missing properties are not filled in with the default - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(self): - content_type = 'application/json' - # an explicit property value is checked against maximum (passing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "alpha": - 1, - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(self): - content_type = 'application/json' - # an explicit property value is checked against maximum (failing) - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "alpha": - 5, - } - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py deleted file mode 100644 index affd09c5194..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_false_validation_request_body/test_post.py +++ /dev/null @@ -1,607 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostUniqueitemsFalseValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostUniqueitemsFalseValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_non_unique_array_of_integers_is_valid_passes(self): - content_type = 'application/json' - # non-unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_objects_is_valid_passes(self): - content_type = 'application/json' - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_nested_objects_is_valid_passes(self): - content_type = 'application/json' - # non-unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_objects_is_valid_passes(self): - content_type = 'application/json' - # non-unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_1_and_true_are_unique_passes(self): - content_type = 'application/json' - # 1 and true are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_integers_is_valid_passes(self): - content_type = 'application/json' - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_arrays_is_valid_passes(self): - content_type = 'application/json' - # non-unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_numbers_are_unique_if_mathematically_unequal_passes(self): - content_type = 'application/json' - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_false_is_not_equal_to_zero_passes(self): - content_type = 'application/json' - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_nested_objects_is_valid_passes(self): - content_type = 'application/json' - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_0_and_false_are_unique_passes(self): - content_type = 'application/json' - # 0 and false are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_arrays_is_valid_passes(self): - content_type = 'application/json' - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_true_is_not_equal_to_one_passes(self): - content_type = 'application/json' - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_heterogeneous_types_are_valid_passes(self): - content_type = 'application/json' - # non-unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_heterogeneous_types_are_valid_passes(self): - content_type = 'application/json' - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsFalseValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py deleted file mode 100644 index 12d95ae7aef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uniqueitems_validation_request_body/test_post.py +++ /dev/null @@ -1,848 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostUniqueitemsValidationRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostUniqueitemsValidationRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_unique_array_of_objects_is_valid_passes(self): - content_type = 'application/json' - # unique array of objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_true_and_a1_are_unique_passes(self): - content_type = 'application/json' - # {"a": true} and {"a": 1} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - True, - }, - { - "a": - 1, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_heterogeneous_types_are_invalid_fails(self): - content_type = 'application/json' - # non-unique heterogeneous types are invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_nested0_and_false_are_unique_passes(self): - content_type = 'application/json' - # nested [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 0, - ], - "foo", - ], - [ - [ - False, - ], - "foo", - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_a_false_and_a0_are_unique_passes(self): - content_type = 'application/json' - # {"a": false} and {"a": 0} are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - False, - }, - { - "a": - 0, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_numbers_are_unique_if_mathematically_unequal_fails(self): - content_type = 'application/json' - # numbers are unique if mathematically unequal - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_false_is_not_equal_to_zero_passes(self): - content_type = 'application/json' - # false is not equal to zero - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_0_and_false_are_unique_passes(self): - content_type = 'application/json' - # [0] and [false] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - 0, - ], - [ - False, - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_arrays_is_valid_passes(self): - content_type = 'application/json' - # unique array of arrays is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_nested_objects_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of nested objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of more than two integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_true_is_not_equal_to_one_passes(self): - content_type = 'application/json' - # true is not equal to one - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_objects_are_non_unique_despite_key_order_fails(self): - content_type = 'application/json' - # objects are non-unique despite key order - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_unique_array_of_strings_is_valid_passes(self): - content_type = 'application/json' - # unique array of strings is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - "foo", - "bar", - "baz", - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_1_and_true_are_unique_passes(self): - content_type = 'application/json' - # [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - 1, - ], - [ - True, - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_different_objects_are_unique_passes(self): - content_type = 'application/json' - # different objects are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "a": - 2, - "b": - 1, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_array_of_integers_is_valid_passes(self): - content_type = 'application/json' - # unique array of integers is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of more than two arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_non_unique_array_of_objects_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of objects is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_unique_array_of_nested_objects_is_valid_passes(self): - content_type = 'application/json' - # unique array of nested objects is valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_arrays_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of arrays is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_non_unique_array_of_strings_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of strings is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - "foo", - "bar", - "foo", - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - def test_nested1_and_true_are_unique_passes(self): - content_type = 'application/json' - # nested [1] and [true] are unique - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 1, - ], - "foo", - ], - [ - [ - True, - ], - "foo", - ], - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_unique_heterogeneous_types_are_valid_passes(self): - content_type = 'application/json' - # unique heterogeneous types are valid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - "{}", - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUniqueitemsValidationRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_non_unique_array_of_integers_is_invalid_fails(self): - content_type = 'application/json' - # non-unique array of integers is invalid - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 1, - ] - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - self.api.post(body=body) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py deleted file mode 100644 index 94a07cc1f57..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_uri_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostUriFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostUriFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py deleted file mode 100644 index 9dfca7bbc66..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_reference_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_uri_reference_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostUriReferenceFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostUriReferenceFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriReferenceFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py deleted file mode 100644 index 93544bef168..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_request_body_post_uri_template_format_request_body/test_post.py +++ /dev/null @@ -1,223 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.request_body_post_uri_template_format_request_body import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestRequestBodyPostUriTemplateFormatRequestBody(ApiTestMixin, unittest.TestCase): - """ - RequestBodyPostUriTemplateFormatRequestBody unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - def test_all_string_formats_ignore_objects_passes(self): - content_type = 'application/json' - # all string formats ignore objects - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_booleans_passes(self): - content_type = 'application/json' - # all string formats ignore booleans - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_integers_passes(self): - content_type = 'application/json' - # all string formats ignore integers - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_floats_passes(self): - content_type = 'application/json' - # all string formats ignore floats - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_arrays_passes(self): - content_type = 'application/json' - # all string formats ignore arrays - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - def test_all_string_formats_ignore_nulls_passes(self): - content_type = 'application/json' - # all string formats ignore nulls - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - body = post.SchemaForRequestBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - mock_request.return_value = self.response( - self.json_bytes(self.response_body), - status=self.response_status - ) - api_response = self.api.post( - body=body, - content_type=content_type - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/requestBody/postUriTemplateFormatRequestBody', - method='post'.upper(), - body=self.json_bytes(payload), - content_type=content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py deleted file mode 100644 index 4c408162b7c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_no_additional_properties_is_valid_passes(self): - # no additional properties is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_additional_invalid_property_is_invalid_fails(self): - # an additional invalid property is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - 12, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_additional_valid_property_is_valid_passes(self): - # an additional valid property is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py deleted file mode 100644 index 2a8383382a9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_additional_properties_are_allowed_passes(self): - # additional properties are allowed - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "quux": - True, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py deleted file mode 100644 index fa6be7937ed..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_an_additional_invalid_property_is_invalid_fails(self): - # an additional invalid property is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_additional_valid_property_is_valid_passes(self): - # an additional valid property is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - True, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py deleted file mode 100644 index 66faadd6a08..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_properties_defined_in_allof_are_not_examined_fails(self): - # properties defined in allOf are not examined - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - True, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_valid_test_case_passes(self): - # valid test case - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - False, - "bar": - True, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py deleted file mode 100644 index 50707b5fb2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_allof_true_anyof_false_oneof_false_fails(self): - # allOf: true, anyOf: false, oneOf: false - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_false_anyof_false_oneof_true_fails(self): - # allOf: false, anyOf: false, oneOf: true - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_false_anyof_true_oneof_true_fails(self): - # allOf: false, anyOf: true, oneOf: true - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 15 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_true_anyof_true_oneof_false_fails(self): - # allOf: true, anyOf: true, oneOf: false - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 6 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_true_anyof_true_oneof_true_passes(self): - # allOf: true, anyOf: true, oneOf: true - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 30 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_allof_true_anyof_false_oneof_true_fails(self): - # allOf: true, anyOf: false, oneOf: true - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 10 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_false_anyof_true_oneof_false_fails(self): - # allOf: false, anyOf: true, oneOf: false - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_allof_false_anyof_false_oneof_false_fails(self): - # allOf: false, anyOf: false, oneOf: false - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py deleted file mode 100644 index dae63942115..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_allof_passes(self): - # allOf - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_mismatch_first_fails(self): - # mismatch first - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_second_fails(self): - # mismatch second - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_wrong_type_fails(self): - # wrong type - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - "quux", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py deleted file mode 100644 index 7713cf8e733..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_simple_types_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_valid_passes(self): - # valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 25 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_mismatch_one_fails(self): - # mismatch one - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 35 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofSimpleTypesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 42142f307ea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_base_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_valid_passes(self): - # valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "bar": - 2, - "baz": - None, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_mismatch_first_allof_fails(self): - # mismatch first allOf - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - "baz": - None, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "baz": - None, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_both_fails(self): - # mismatch both - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_second_allof_fails(self): - # mismatch second allOf - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "quux", - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 68d704af400..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_one_empty_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_any_data_is_valid_passes(self): - # any data is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 0d11bae4dbb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_string_is_invalid_fails(self): - # string is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_number_is_valid_passes(self): - # number is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 557fe4b7496..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_string_is_invalid_fails(self): - # string is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_number_is_valid_passes(self): - # number is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py deleted file mode 100644 index 3e280d443b0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_any_data_is_valid_passes(self): - # any data is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py deleted file mode 100644 index 2a40c9b558f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_complex_types_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,170 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_second_anyof_valid_complex_passes(self): - # second anyOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_neither_anyof_valid_complex_fails(self): - # neither anyOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_anyof_valid_complex_passes(self): - # both anyOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_first_anyof_valid_complex_passes(self): - # first anyOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py deleted file mode 100644 index 7707cd74acf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAnyofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAnyofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_second_anyof_valid_passes(self): - # second anyOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_neither_anyof_valid_fails(self): - # neither anyOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_anyof_valid_passes(self): - # both anyOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_first_anyof_valid_passes(self): - # first anyOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index d8981bb737f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_base_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_one_anyof_valid_passes(self): - # one anyOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_both_anyof_invalid_fails(self): - # both anyOf invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index d8a37341e9b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_string_is_valid_passes(self): - # string is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_number_is_valid_passes(self): - # number is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py deleted file mode 100644 index 717a6d1e2d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_array_type_matches_arrays_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_a_float_is_not_an_array_fails(self): - # a float is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_boolean_is_not_an_array_fails(self): - # a boolean is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_an_array_fails(self): - # null is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_object_is_not_an_array_fails(self): - # an object is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_not_an_array_fails(self): - # a string is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_array_is_an_array_passes(self): - # an array is an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_integer_is_not_an_array_fails(self): - # an integer is not an array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py deleted file mode 100644 index f4daf112ba0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_boolean_type_matches_booleans_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,294 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_an_empty_string_is_not_a_boolean_fails(self): - # an empty string is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_float_is_not_a_boolean_fails(self): - # a float is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_a_boolean_fails(self): - # null is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_zero_is_not_a_boolean_fails(self): - # zero is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_array_is_not_a_boolean_fails(self): - # an array is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_not_a_boolean_fails(self): - # a string is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_false_is_a_boolean_passes(self): - # false is a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_integer_is_not_a_boolean_fails(self): - # an integer is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_true_is_a_boolean_passes(self): - # true is a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_object_is_not_a_boolean_fails(self): - # an object is not a boolean - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py deleted file mode 100644 index ccb4450d001..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_int_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostByIntResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostByIntResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_int_by_int_fail_fails(self): - # int by int fail - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_int_by_int_passes(self): - # int by int - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 10 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByIntResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py deleted file mode 100644 index 553452dd34d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_number_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostByNumberResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostByNumberResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_45_is_multiple_of15_passes(self): - # 4.5 is multiple of 1.5 - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 4.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_35_is_not_multiple_of15_fails(self): - # 35 is not multiple of 1.5 - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 35 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_zero_is_multiple_of_anything_passes(self): - # zero is multiple of anything - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postByNumberResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py deleted file mode 100644 index c8e0af97ede..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_by_small_number_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostBySmallNumberResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostBySmallNumberResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_000751_is_not_multiple_of00001_fails(self): - # 0.00751 is not multiple of 0.0001 - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.00751 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_00075_is_multiple_of00001_passes(self): - # 0.0075 is multiple of 0.0001 - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0075 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postBySmallNumberResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 813449ce9a1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_date_time_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostDateTimeFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostDateTimeFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postDateTimeFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 0d82125e127..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_email_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEmailFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEmailFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEmailFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py deleted file mode 100644 index 35e22564157..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_integer_zero_is_valid_passes(self): - # integer zero is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_float_zero_is_valid_passes(self): - # float zero is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_false_is_invalid_fails(self): - # false is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py deleted file mode 100644 index 3ddc9a784b8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_true_is_invalid_fails(self): - # true is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_integer_one_is_valid_passes(self): - # integer one is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_float_one_is_valid_passes(self): - # float one is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py deleted file mode 100644 index a775da33fc4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_escaped_characters_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_member2_is_valid_passes(self): - # member 2 is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo\rbar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_member1_is_valid_passes(self): - # member 1 is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo\nbar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_another_string_is_invalid_fails(self): - # another string is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "abc" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py deleted file mode 100644 index 229b64beab5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_false_is_valid_passes(self): - # false is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_float_zero_is_invalid_fails(self): - # float zero is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_integer_zero_is_invalid_fails(self): - # integer zero is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py deleted file mode 100644 index abb8635973d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_float_one_is_invalid_fails(self): - # float one is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_true_is_valid_passes(self): - # true is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_integer_one_is_invalid_fails(self): - # integer one is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py deleted file mode 100644 index 59f2f9b9acb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_enums_in_properties_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,218 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_missing_optional_property_is_valid_passes(self): - # missing optional property is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - "bar", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_wrong_foo_value_fails(self): - # wrong foo value - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foot", - "bar": - "bar", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_properties_are_valid_passes(self): - # both properties are valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - "bar": - "bar", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_wrong_bar_value_fails(self): - # wrong bar value - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - "bar": - "bart", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_missing_all_properties_is_invalid_fails(self): - # missing all properties is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_missing_required_property_is_invalid_fails(self): - # missing required property is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "foo", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postEnumsInPropertiesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py deleted file mode 100644 index 5610f1bd7aa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_forbidden_property_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostForbiddenPropertyResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_present_fails(self): - # property present - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_property_absent_passes(self): - # property absent - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 1, - "baz": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postForbiddenPropertyResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py deleted file mode 100644 index ac74108dd33..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_hostname_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostHostnameFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostHostnameFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postHostnameFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py deleted file mode 100644 index c772cd05dc4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_integer_type_matches_integers_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_an_object_is_not_an_integer_fails(self): - # an object is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_not_an_integer_fails(self): - # a string is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_an_integer_fails(self): - # null is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_float_with_zero_fractional_part_is_an_integer_passes(self): - # a float with zero fractional part is an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_float_is_not_an_integer_fails(self): - # a float is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_boolean_is_not_an_integer_fails(self): - # a boolean is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_integer_is_an_integer_passes(self): - # an integer is an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_string_is_still_not_an_integer_even_if_it_looks_like_one_fails(self): - # a string is still not an integer, even if it looks like one - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_array_is_not_an_integer_fails(self): - # an array is not an integer - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py deleted file mode 100644 index a198deb37b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_always_invalid_but_naive_implementations_may_raise_an_overflow_error_fails(self): - # always invalid, but naive implementations may raise an overflow error - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0E308 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_valid_integer_with_multipleof_float_passes(self): - # valid integer with multipleOf float - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123456789 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py deleted file mode 100644 index 3cd375f9db4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_invalid_string_value_for_default_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_valid_when_property_is_specified_passes(self): - # valid when property is specified - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - "good", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_still_valid_when_the_invalid_default_is_used_passes(self): - # still valid when the invalid default is used - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 4804e8e5a12..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv4_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostIpv4FormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostIpv4FormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv4FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py deleted file mode 100644 index b63faab6c47..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ipv6_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostIpv6FormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostIpv6FormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postIpv6FormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 49e2e9df945..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_json_pointer_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostJsonPointerFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postJsonPointerFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 42ccfe7cb15..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaximumValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaximumValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_below_the_maximum_is_valid_passes(self): - # below the maximum is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.6 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_above_the_maximum_is_invalid_fails(self): - # above the maximum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py deleted file mode 100644 index 725ca59dd94..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_below_the_maximum_is_invalid_passes(self): - # below the maximum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 299.97 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_above_the_maximum_is_invalid_fails(self): - # above the maximum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_boundary_point_integer_is_valid_passes(self): - # boundary point integer is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_boundary_point_float_is_valid_passes(self): - # boundary point float is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 300.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index d297f38843b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxitems_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,163 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaxitemsValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_too_long_is_invalid_fails(self): - # too long is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 3, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_non_arrays_passes(self): - # ignores non-arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_shorter_is_valid_passes(self): - # shorter is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 7f5622b34b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxlength_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaxlengthValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_too_long_is_invalid_fails(self): - # too long is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_non_strings_passes(self): - # ignores non-strings - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 100 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_shorter_is_valid_passes(self): - # shorter is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "f" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_two_supplementary_unicode_code_points_is_long_enough_passes(self): - # two supplementary Unicode code points is long enough - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "💩💩" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "fo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py deleted file mode 100644 index 58145de0411..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_no_properties_is_valid_passes(self): - # no properties is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_one_property_is_invalid_fails(self): - # one property is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 28a24d6e03f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_maxproperties_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_too_long_is_invalid_fails(self): - # too long is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_arrays_passes(self): - # ignores arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 3, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_strings_passes(self): - # ignores strings - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_shorter_is_valid_passes(self): - # shorter is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index ca262ddbde2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,154 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMinimumValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMinimumValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_below_the_minimum_is_invalid_fails(self): - # below the minimum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0.6 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_above_the_minimum_is_valid_passes(self): - # above the minimum is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.6 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py deleted file mode 100644 index d5842cf8a47..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_boundary_point_is_valid_passes(self): - # boundary point is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_positive_above_the_minimum_is_valid_passes(self): - # positive above the minimum is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_int_below_the_minimum_is_invalid_fails(self): - # int below the minimum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_float_below_the_minimum_is_invalid_fails(self): - # float below the minimum is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2.0001 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_boundary_point_with_float_is_valid_passes(self): - # boundary point with float is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -2.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_negative_above_the_minimum_is_valid_passes(self): - # negative above the minimum is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - -1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_non_numbers_passes(self): - # ignores non-numbers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "x" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 4450462f998..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minitems_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,160 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMinitemsValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMinitemsValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_too_short_is_invalid_fails(self): - # too short is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_non_arrays_passes(self): - # ignores non-arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_longer_is_valid_passes(self): - # longer is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 247a17756b0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minlength_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMinlengthValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMinlengthValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_too_short_is_invalid_fails(self): - # too short is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "f" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_one_supplementary_unicode_code_point_is_not_long_enough_fails(self): - # one supplementary Unicode code point is not long enough - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "💩" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_longer_is_valid_passes(self): - # longer is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_non_strings_passes(self): - # ignores non-strings - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "fo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinlengthValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 2f3aadb3583..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_minproperties_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,224 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_ignores_arrays_passes(self): - # ignores arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_too_short_is_invalid_fails(self): - # too short is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_strings_passes(self): - # ignores strings - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_longer_is_valid_passes(self): - # longer is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_exact_length_is_valid_passes(self): - # exact length is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postMinpropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py deleted file mode 100644 index 9d8f8fbf930..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_valid_passes(self): - # null is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py deleted file mode 100644 index 8fc358252fb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_valid_passes(self): - # null is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py deleted file mode 100644 index ffb0092cb84..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_items_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNestedItemsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNestedItemsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_valid_nested_array_passes(self): - # valid nested array - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - [ - 1, - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_nested_array_with_invalid_type_fails(self): - # nested array with invalid type - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - [ - "1", - ], - ], - [ - [ - 2, - ], - [ - 3, - ], - ], - ], - [ - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_not_deep_enough_fails(self): - # not deep enough - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 1, - ], - [ - 2, - ], - [ - 3, - ], - ], - [ - [ - 4, - ], - [ - 5, - ], - [ - 6, - ], - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedItemsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py deleted file mode 100644 index 188ce661ff1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_anything_non_null_is_invalid_fails(self): - # anything non-null is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_valid_passes(self): - # null is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 4b615daed14..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_more_complex_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,130 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_other_match_passes(self): - # other match - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_mismatch_fails(self): - # mismatch - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "bar", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_match_passes(self): - # match - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py deleted file mode 100644 index 4b505c1b4dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_not_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_not_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNotResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNotResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_allowed_passes(self): - # allowed - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_disallowed_fails(self): - # disallowed - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNotResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py deleted file mode 100644 index b0ce13a519c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_nul_characters_in_strings_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_match_string_with_nul_passes(self): - # match string with nul - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "hello\x00there" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_do_not_match_string_lacking_nul_fails(self): - # do not match string lacking nul - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "hellothere" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNulCharactersInStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py deleted file mode 100644 index 39685609338..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,288 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_a_float_is_not_null_fails(self): - # a float is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_object_is_not_null_fails(self): - # an object is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_false_is_not_null_fails(self): - # false is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_integer_is_not_null_fails(self): - # an integer is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_true_is_not_null_fails(self): - # true is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_zero_is_not_null_fails(self): - # zero is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_empty_string_is_not_null_fails(self): - # an empty string is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_null_passes(self): - # null is null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_array_is_not_null_fails(self): - # an array is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_not_null_fails(self): - # a string is not null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py deleted file mode 100644 index aa54a7620bc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_number_type_matches_numbers_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_an_array_is_not_a_number_fails(self): - # an array is not a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_a_number_fails(self): - # null is not a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_object_is_not_a_number_fails(self): - # an object is not a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_boolean_is_not_a_number_fails(self): - # a boolean is not a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_float_is_a_number_passes(self): - # a float is a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_string_is_still_not_a_number_even_if_it_looks_like_one_fails(self): - # a string is still not a number, even if it looks like one - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_not_a_number_fails(self): - # a string is not a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_integer_is_a_number_passes(self): - # an integer is a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_float_with_zero_fractional_part_is_a_number_and_an_integer_passes(self): - # a float with zero fractional part is a number (and an integer) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index e9064f7a8a5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_properties_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_doesnt_invalidate_other_properties_passes(self): - # doesn't invalidate other properties - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "quux": - [ - ], - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_arrays_passes(self): - # ignores arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_one_property_invalid_is_invalid_fails(self): - # one property invalid is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - { - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_properties_present_and_valid_is_valid_passes(self): - # both properties present and valid is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - "baz", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_both_properties_invalid_is_invalid_fails(self): - # both properties invalid is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - [ - ], - "bar": - { - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py deleted file mode 100644 index 55da20de7ef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_object_type_matches_objects_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,216 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_a_float_is_not_an_object_fails(self): - # a float is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_an_object_fails(self): - # null is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_array_is_not_an_object_fails(self): - # an array is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_object_is_an_object_passes(self): - # an object is an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_string_is_not_an_object_fails(self): - # a string is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_integer_is_not_an_object_fails(self): - # an integer is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_boolean_is_not_an_object_fails(self): - # a boolean is not an object - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py deleted file mode 100644 index 678c4ad8098..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_complex_types_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostOneofComplexTypesResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_first_oneof_valid_complex_passes(self): - # first oneOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_neither_oneof_valid_complex_fails(self): - # neither oneOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 2, - "bar": - "quux", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_oneof_valid_complex_fails(self): - # both oneOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_second_oneof_valid_complex_passes(self): - # second oneOf valid (complex) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - "baz", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofComplexTypesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py deleted file mode 100644 index ea487855ed5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,148 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostOneofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostOneofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_second_oneof_valid_passes(self): - # second oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 2.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_both_oneof_valid_fails(self): - # both oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_first_oneof_valid_passes(self): - # first oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_neither_oneof_valid_fails(self): - # neither oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.5 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index cfe0200c089..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_base_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_both_oneof_valid_fails(self): - # both oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_mismatch_base_schema_fails(self): - # mismatch base schema - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 3 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_one_oneof_valid_passes(self): - # one oneOf valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foobar" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py deleted file mode 100644 index 471fdae40c1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_empty_schema_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_both_valid_invalid_fails(self): - # both valid - invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_one_valid_valid_passes(self): - # one valid - valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py deleted file mode 100644 index dca5c2b9194..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_oneof_with_required_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,168 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostOneofWithRequiredResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_both_valid_invalid_fails(self): - # both valid - invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - "baz": - 3, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_both_invalid_invalid_fails(self): - # both invalid - invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_first_valid_valid_passes(self): - # first valid - valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "bar": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_second_valid_valid_passes(self): - # second valid - valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - "baz": - 3, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postOneofWithRequiredResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py deleted file mode 100644 index 245619a9482..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_is_not_anchored_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_matches_a_substring_passes(self): - # matches a substring - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "xxaayy" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index 15e3b6dc969..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_pattern_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostPatternValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostPatternValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_ignores_arrays_passes(self): - # ignores arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_objects_passes(self): - # ignores objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_null_passes(self): - # ignores null - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_floats_passes(self): - # ignores floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.0 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_non_matching_pattern_is_invalid_fails(self): - # a non-matching pattern is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "abc" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_ignores_booleans_passes(self): - # ignores booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_matching_pattern_is_valid_passes(self): - # a matching pattern is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "aaa" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_integers_passes(self): - # ignores integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 123 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPatternValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py deleted file mode 100644 index d3104eca246..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_properties_with_escaped_characters_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_object_with_all_numbers_is_valid_passes(self): - # object with all numbers is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_object_with_strings_is_invalid_fails(self): - # object with strings is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - "foo\\bar": - "1", - "foo\rbar": - "1", - "foo\tbar": - "1", - "foo\fbar": - "1", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py deleted file mode 100644 index 15809e33dbe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py deleted file mode 100644 index 00e6305e31d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_additionalproperties_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "someProp": - { - "$ref": - "a", - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "someProp": - { - "$ref": - 2, - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py deleted file mode 100644 index 02b7a73a40d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_allof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInAllofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInAllofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAllofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py deleted file mode 100644 index 5094e0cc1c3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_anyof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInAnyofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInAnyofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInAnyofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py deleted file mode 100644 index 73d211de567..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_items_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInItemsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInItemsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "$ref": - "a", - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "$ref": - 2, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInItemsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py deleted file mode 100644 index fa87d826404..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_not_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInNotResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInNotResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInNotResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInNotResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py deleted file mode 100644 index 50be3af9dc6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_oneof_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInOneofResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInOneofResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - "a", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "$ref": - 2, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInOneofResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py deleted file mode 100644 index 3d93977c2bc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_ref_in_property_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRefInPropertyResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRefInPropertyResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_named_ref_valid_passes(self): - # property named $ref valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "a": - { - "$ref": - "a", - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_property_named_ref_invalid_fails(self): - # property named $ref invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "a": - { - "$ref": - 2, - }, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRefInPropertyResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index c7978bfe4bc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_default_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_not_required_by_default_passes(self): - # not required by default - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index e3c20b581ce..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,191 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRequiredValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRequiredValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_ignores_arrays_passes(self): - # ignores arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_present_required_property_is_valid_passes(self): - # present required property is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_other_non_objects_passes(self): - # ignores other non-objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_ignores_strings_passes(self): - # ignores strings - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_present_required_property_is_invalid_fails(self): - # non-present required property is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "bar": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py deleted file mode 100644 index 2e220a6fccf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_empty_array_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_property_not_required_passes(self): - # property not required - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py deleted file mode 100644 index 921a4c2923c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_required_with_escaped_characters_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_object_with_some_properties_missing_is_invalid_fails(self): - # object with some properties missing is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - "1", - "foo\"bar": - "1", - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_object_with_all_properties_present_is_valid_passes(self): - # object with all properties present is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "foo\nbar": - 1, - "foo\"bar": - 1, - "foo\\bar": - 1, - "foo\rbar": - 1, - "foo\tbar": - 1, - "foo\fbar": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index abadbf18cb1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_simple_enum_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_something_else_is_invalid_fails(self): - # something else is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 4 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_one_of_the_enum_is_valid_passes(self): - # one of the enum is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postSimpleEnumValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py deleted file mode 100644 index e1a0a1dd840..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_string_type_matches_strings_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_1_is_not_a_string_fails(self): - # 1 is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_still_a_string_even_if_it_looks_like_a_number_passes(self): - # a string is still a string, even if it looks like a number - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "1" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_empty_string_is_still_a_string_passes(self): - # an empty string is still a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_float_is_not_a_string_fails(self): - # a float is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 1.1 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_object_is_not_a_string_fails(self): - # an object is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_an_array_is_not_a_string_fails(self): - # an array is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_boolean_is_not_a_string_fails(self): - # a boolean is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - True - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_null_is_not_a_string_fails(self): - # null is not a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_a_string_is_a_string_passes(self): - # a string is a string - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - "foo" - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py deleted file mode 100644 index c729358716d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_missing_properties_are_not_filled_in_with_the_default_passes(self): - # missing properties are not filled in with the default - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_explicit_property_value_is_checked_against_maximum_passing_passes(self): - # an explicit property value is checked against maximum (passing) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "alpha": - 1, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_an_explicit_property_value_is_checked_against_maximum_failing_fails(self): - # an explicit property value is checked against maximum (failing) - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - "alpha": - 5, - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index f78f2961df8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_false_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,606 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_non_unique_array_of_integers_is_valid_passes(self): - # non-unique array of integers is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_objects_is_valid_passes(self): - # unique array of objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_nested_objects_is_valid_passes(self): - # non-unique array of nested objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_objects_is_valid_passes(self): - # non-unique array of objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_1_and_true_are_unique_passes(self): - # 1 and true are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_integers_is_valid_passes(self): - # unique array of integers is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_arrays_is_valid_passes(self): - # non-unique array of arrays is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_numbers_are_unique_if_mathematically_unequal_passes(self): - # numbers are unique if mathematically unequal - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_false_is_not_equal_to_zero_passes(self): - # false is not equal to zero - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_nested_objects_is_valid_passes(self): - # unique array of nested objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_0_and_false_are_unique_passes(self): - # 0 and false are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_arrays_is_valid_passes(self): - # unique array of arrays is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_true_is_not_equal_to_one_passes(self): - # true is not equal to one - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_heterogeneous_types_are_valid_passes(self): - # non-unique heterogeneous types are valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_heterogeneous_types_are_valid_passes(self): - # unique heterogeneous types are valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py deleted file mode 100644 index f7a88f24b26..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uniqueitems_validation_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,947 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_unique_array_of_objects_is_valid_passes(self): - # unique array of objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "baz", - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_true_and_a1_are_unique_passes(self): - # {"a": true} and {"a": 1} are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - True, - }, - { - "a": - 1, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_heterogeneous_types_are_invalid_fails(self): - # non-unique heterogeneous types are invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - { - }, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_nested0_and_false_are_unique_passes(self): - # nested [0] and [false] are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 0, - ], - "foo", - ], - [ - [ - False, - ], - "foo", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_a_false_and_a0_are_unique_passes(self): - # {"a": false} and {"a": 0} are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - False, - }, - { - "a": - 0, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_numbers_are_unique_if_mathematically_unequal_fails(self): - # numbers are unique if mathematically unequal - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1.0, - 1.0, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_false_is_not_equal_to_zero_passes(self): - # false is not equal to zero - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 0, - False, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_0_and_false_are_unique_passes(self): - # [0] and [false] are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - 0, - ], - [ - False, - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_arrays_is_valid_passes(self): - # unique array of arrays is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_nested_objects_is_invalid_fails(self): - # non-unique array of nested objects is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_non_unique_array_of_more_than_two_integers_is_invalid_fails(self): - # non-unique array of more than two integers is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_true_is_not_equal_to_one_passes(self): - # true is not equal to one - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - True, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_objects_are_non_unique_despite_key_order_fails(self): - # objects are non-unique despite key order - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "b": - 2, - "a": - 1, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_unique_array_of_strings_is_valid_passes(self): - # unique array of strings is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - "foo", - "bar", - "baz", - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_1_and_true_are_unique_passes(self): - # [1] and [true] are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - 1, - ], - [ - True, - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_different_objects_are_unique_passes(self): - # different objects are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "a": - 1, - "b": - 2, - }, - { - "a": - 2, - "b": - 1, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_array_of_integers_is_valid_passes(self): - # unique array of integers is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 2, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_more_than_two_arrays_is_invalid_fails(self): - # non-unique array of more than two arrays is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "bar", - ], - [ - "foo", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_non_unique_array_of_objects_is_invalid_fails(self): - # non-unique array of objects is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - "bar", - }, - { - "foo": - "bar", - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_unique_array_of_nested_objects_is_valid_passes(self): - # unique array of nested objects is valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - "foo": - { - "bar": - { - "baz": - True, - }, - }, - }, - { - "foo": - { - "bar": - { - "baz": - False, - }, - }, - }, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_arrays_is_invalid_fails(self): - # non-unique array of arrays is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - "foo", - ], - [ - "foo", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_non_unique_array_of_strings_is_invalid_fails(self): - # non-unique array of strings is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - "foo", - "bar", - "foo", - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - def test_nested1_and_true_are_unique_passes(self): - # nested [1] and [true] are unique - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - [ - [ - 1, - ], - "foo", - ], - [ - [ - True, - ], - "foo", - ], - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_unique_heterogeneous_types_are_valid_passes(self): - # unique heterogeneous types are valid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - { - }, - [ - 1, - ], - True, - None, - 1, - "{}", - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_non_unique_array_of_integers_is_invalid_fails(self): - # non-unique array of integers is invalid - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - 1, - 1, - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - with self.assertRaises((unit_test_api.ApiValueError, unit_test_api.ApiTypeError)): - self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUniqueitemsValidationResponseBodyForContentTypes', - method='post'.upper(), - content_type=None, - accept_content_type=accept_content_type, - ) - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 2c93b63f9e8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostUriFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostUriFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 6fa62462b50..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_reference_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostUriReferenceFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriReferenceFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py b/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py deleted file mode 100644 index 3a57d51e1ae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test/test_paths/test_response_body_post_uri_template_format_response_body_for_content_types/test_post.py +++ /dev/null @@ -1,222 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import unit_test_api -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types import post # noqa: E501 -from unit_test_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestResponseBodyPostUriTemplateFormatResponseBodyForContentTypes(ApiTestMixin, unittest.TestCase): - """ - ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - def test_all_string_formats_ignore_objects_passes(self): - # all string formats ignore objects - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - { - } - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_booleans_passes(self): - # all string formats ignore booleans - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - False - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_integers_passes(self): - # all string formats ignore integers - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 12 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_floats_passes(self): - # all string formats ignore floats - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - 13.7 - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_arrays_passes(self): - # all string formats ignore arrays - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - [ - ] - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - def test_all_string_formats_ignore_nulls_passes(self): - # all string formats ignore nulls - accept_content_type = 'application/json' - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - payload = ( - None - ) - mock_request.return_value = self.response( - self.json_bytes(payload), - status=self.response_status - ) - api_response = self.api.post( - accept_content_types=(accept_content_type,) - ) - self.assert_pool_manager_request_called_with( - mock_request, - self._configuration.host + '/responseBody/postUriTemplateFormatResponseBodyForContentTypes', - method='post'.upper(), - accept_content_type=accept_content_type, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, post.SchemaFor200ResponseBodyApplicationJson) - deserialized_response_body = post.SchemaFor200ResponseBodyApplicationJson.from_openapi_data_oapg( - payload, - _configuration=self._configuration - ) - assert api_response.body == deserialized_response_body - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh b/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh deleted file mode 100755 index 9728a9b5316..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/test_python.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log -SETUP_OUT=*.egg-info -VENV=venv -DEACTIVE=false - -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 - -### set virtualenv -if [ -z "$VENVV" ]; then - python3 -m venv $VENV - source $VENV/bin/activate - DEACTIVE=true -fi - -### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT -### locally install the package, needed for pycharm problem checking -pip install -e . - -### run tests -tox || exit 1 - -### static analysis of code -#flake8 --show-source petstore_api/ - -### deactivate virtualenv -#if [ $DEACTIVE == true ]; then -# deactivate -#fi diff --git a/samples/openapi3/client/3_0_3_unit_test/python/tox.ini b/samples/openapi3/client/3_0_3_unit_test/python/tox.ini deleted file mode 100644 index 6db4b8ba647..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py37 - -[testenv] -passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=unit_test_api diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/__init__.py deleted file mode 100644 index 5ca6e989be0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -__version__ = "1.0.0" - -# import ApiClient -from unit_test_api.api_client import ApiClient - -# import Configuration -from unit_test_api.configuration import Configuration - -# import exceptions -from unit_test_api.exceptions import OpenApiException -from unit_test_api.exceptions import ApiAttributeError -from unit_test_api.exceptions import ApiTypeError -from unit_test_api.exceptions import ApiValueError -from unit_test_api.exceptions import ApiKeyError -from unit_test_api.exceptions import ApiException diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py deleted file mode 100644 index 31022822e2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/api_client.py +++ /dev/null @@ -1,1499 +0,0 @@ -# coding: utf-8 -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -from decimal import Decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing.pool import ThreadPool -import re -import tempfile -import typing -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote -from urllib3.fields import RequestField as RequestFieldBase - -import frozendict - -from unit_test_api import rest -from unit_test_api.configuration import Configuration -from unit_test_api.exceptions import ApiTypeError, ApiValueError -from unit_test_api.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, - date, - datetime, - none_type, - Unset, - unset, -) - - -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return float(obj) - elif isinstance(obj, int): - return int(obj) - elif isinstance(obj, Decimal): - if obj.as_tuple().exponent >= 0: - return int(obj) - return float(obj) - elif isinstance(obj, NoneClass): - return None - elif isinstance(obj, BoolClass): - return bool(obj) - elif isinstance(obj, (dict, frozendict.frozendict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - - def __init__(self, prefix: str, separator: str): - self.prefix = prefix - self.separator = separator - self.first = True - if separator in {'.', '|', '%20'}: - item_separator = separator - else: - item_separator = ',' - self.item_separator = item_separator - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return quote(str(in_data)) - return str(in_data) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - if style is ParameterStyle.FORM: - return True - return super()._get_default_explode(style) - - def _serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -@dataclass -class ParameterBase(JSONDetector): - name: str - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] - - __style_to_in_type = { - ParameterStyle.MATRIX: {ParameterInType.PATH}, - ParameterStyle.LABEL: {ParameterInType.PATH}, - ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, - ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, - ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, - } - __in_type_to_default_style = { - ParameterInType.QUERY: ParameterStyle.FORM, - ParameterInType.PATH: ParameterStyle.SIMPLE, - ParameterInType.HEADER: ParameterStyle.SIMPLE, - ParameterInType.COOKIE: ParameterStyle.FORM, - } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} - _json_encoder = JSONEncoder() - - @classmethod - def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): - if style is None: - return - in_type_set = cls.__style_to_in_type[style] - if in_type not in in_type_set: - raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( - style, in_type_set - ) - ) - - def __init__( - self, - name: str, - in_type: ParameterInType, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') - if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) - self.__verify_style_to_in_type(style, in_type) - if content is None and style is None: - style = self.__in_type_to_default_style[in_type] - if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') - self.in_type = in_type - self.name = name - self.required = required - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - self.schema = schema - self.content = content - - def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=self._json_encoder.compact_separators) - return json.dumps(in_data) - - -class PathParameter(ParameterBase, StyleSimpleSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.PATH, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) - return self._to_dict(self.name, value) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if self.style: - if self.style is ParameterStyle.SIMPLE: - return self.__serialize_simple(cast_in_data) - elif self.style is ParameterStyle.LABEL: - return self.__serialize_label(cast_in_data) - elif self.style is ParameterStyle.MATRIX: - return self.__serialize_matrix(cast_in_data) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class QueryParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.QUERY, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_space_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_pipe_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._serialize_form( - in_data, - name=self.name, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if self.style: - # TODO update query ones to omit setting values when [] {} or None is input - if self.style is ParameterStyle.FORM: - return self.__serialize_form(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.SPACE_DELIMITED: - return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.PIPE_DELIMITED: - return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) - # self.content will be length one - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class CookieParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.COOKIE, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if self.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - value = self._serialize_form( - cast_in_data, - explode=self.explode, - name=self.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return self._to_dict(self.name, value) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class HeaderParameter(ParameterBase, StyleSimpleSerializer): - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.HEADER, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> HTTPHeaderDict: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class Encoding: - def __init__( - self, - content_type: str, - headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: bool = False, - ): - self.content_type = content_type - self.headers = headers - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - - -@dataclass -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - def __init__( - self, - response: urllib3.HTTPResponse, - body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - ): - """ - pycharm needs this to prevent 'Unexpected argument' warnings - """ - self.response = response - self.body = body - self.headers = headers - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - def __init__( - self, - response_cls: typing.Type[ApiResponse] = ApiResponse, - content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, - ): - self.headers = headers - if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - self.response_cls = response_cls - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - def __deserialize_application_octet_stream( - self, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as new_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - new_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') - deserialized_body = unset - streamed = response.supports_chunked_reads() - - deserialized_headers = unset - if self.headers is not None: - # TODO add header deserialiation here - pass - - if self.content is not None: - if content_type not in self.content: - raise ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" - ) - body_schema = self.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) - - if self._content_type_is_json(content_type): - body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) - elif streamed: - response.release_conn() - - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - _pool = None - - def __init__( - self, - configuration: typing.Optional[Configuration] = None, - header_name: typing.Optional[str] = None, - header_value: typing.Optional[str] = None, - cookie: typing.Optional[str] = None, - pool_threads: int = 1 - ): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = HTTPHeaderDict() - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - - # header parameters - used_headers = HTTPHeaderDict(self.default_headers) - if self.cookie: - headers['Cookie'] = self.cookie - - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) - - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - if host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = host + resource_path - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings: Auth Settings names for the request. - :param async_req: execute request asynchronously - :type async_req: bool, optional TODO remove, unused - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystme file and the BinarySchema - instance will also inherit from FileSchema and FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - - if not async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if not auth_setting: - continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query - need to pass in prefix_separator_iterator - and need to output resource_path with query params added - """ - raise ApiValueError("Auth in query not yet implemented") - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - -class Api: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - - def _get_host_oapg( - self, - operation_id: str, - servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None - ) -> typing.Optional[str]: - configuration = self.api_client.configuration - try: - if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) - else: - index = host_index - server_variables = configuration.server_operation_variables.get( - operation_id, configuration.server_variables - ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers - ) - except IndexError: - if servers: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(servers) - ) - host = None - return host - - -class SerializedRequestBody(typing_extensions.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType Schema info - """ - __json_encoder = JSONEncoder() - - def __init__( - self, - content: typing.Dict[str, MediaType], - required: bool = False, - ): - self.required = required - if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: - in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return dict(body=json_str) - - @staticmethod - def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: - if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') - elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') - elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') - elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') - return dict(body=str(in_data)) - - def __multipart_json_item(self, key: str, value: Schema) -> RequestField: - json_value = self.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - def __multipart_form_item(self, key: str, value: Schema) -> RequestField: - if isinstance(value, str): - request_field = 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.make_multipart(content_type='application/octet-stream') - elif isinstance(value, FileIO): - # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) - value.close() - else: - request_field = self.__multipart_json_item(key=key, value=value) - return request_field - - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: - if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - 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 - for item in value: - request_field = self.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = self.__multipart_json_item(key=key, value=value) - fields.append(request_field) - else: - request_field = self.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return dict(fields=tuple(fields)) - - def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: - if isinstance(in_data, bytes): - return dict(body=in_data) - # FileIO type - result = dict(body=in_data.read()) - in_data.close() - return result - - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - if not isinstance(in_data, frozendict.frozendict): - raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') - cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return dict(body=value) - - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = self.content[content_type] - if isinstance(in_data, media_type.schema): - cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = media_type.schema(**in_data) - else: - cast_in_data = media_type.schema(in_data) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if self._content_type_is_json(content_type): - return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': - return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/path_to_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/path_to_api.py deleted file mode 100644 index 8a75c50c3ee..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/path_to_api.py +++ /dev/null @@ -1,536 +0,0 @@ -import typing_extensions - -from unit_test_api.paths import PathValues -from unit_test_api.apis.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.apis.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.apis.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.apis.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.apis.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_request_body import RequestBodyPostAllofRequestBody -from unit_test_api.apis.paths.response_body_post_allof_response_body_for_content_types import ResponseBodyPostAllofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_with_base_schema_request_body import RequestBodyPostAllofWithBaseSchemaRequestBody -from unit_test_api.apis.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_simple_types_request_body import RequestBodyPostAllofSimpleTypesRequestBody -from unit_test_api.apis.paths.response_body_post_allof_simple_types_response_body_for_content_types import ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_with_one_empty_schema_request_body import RequestBodyPostAllofWithOneEmptySchemaRequestBody -from unit_test_api.apis.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_with_two_empty_schemas_request_body import RequestBodyPostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.apis.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_with_the_first_empty_schema_request_body import RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.apis.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_with_the_last_empty_schema_request_body import RequestBodyPostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.apis.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.apis.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import RequestBodyPostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.apis.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_anyof_request_body import RequestBodyPostAnyofRequestBody -from unit_test_api.apis.paths.response_body_post_anyof_response_body_for_content_types import ResponseBodyPostAnyofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_anyof_with_base_schema_request_body import RequestBodyPostAnyofWithBaseSchemaRequestBody -from unit_test_api.apis.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_anyof_complex_types_request_body import RequestBodyPostAnyofComplexTypesRequestBody -from unit_test_api.apis.paths.response_body_post_anyof_complex_types_response_body_for_content_types import ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_anyof_with_one_empty_schema_request_body import RequestBodyPostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.apis.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.apis.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_invalid_string_value_for_default_request_body import RequestBodyPostInvalidStringValueForDefaultRequestBody -from unit_test_api.apis.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from unit_test_api.apis.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_simple_enum_validation_request_body import RequestBodyPostSimpleEnumValidationRequestBody -from unit_test_api.apis.paths.response_body_post_simple_enum_validation_response_body_for_content_types import ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enums_in_properties_request_body import RequestBodyPostEnumsInPropertiesRequestBody -from unit_test_api.apis.paths.response_body_post_enums_in_properties_response_body_for_content_types import ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enum_with_escaped_characters_request_body import RequestBodyPostEnumWithEscapedCharactersRequestBody -from unit_test_api.apis.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enum_with_false_does_not_match0_request_body import RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.apis.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enum_with_true_does_not_match1_request_body import RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.apis.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enum_with0_does_not_match_false_request_body import RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.apis.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_enum_with1_does_not_match_true_request_body import RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.apis.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_nul_characters_in_strings_request_body import RequestBodyPostNulCharactersInStringsRequestBody -from unit_test_api.apis.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_email_format_request_body import RequestBodyPostEmailFormatRequestBody -from unit_test_api.apis.paths.response_body_post_email_format_response_body_for_content_types import ResponseBodyPostEmailFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ipv4_format_request_body import RequestBodyPostIpv4FormatRequestBody -from unit_test_api.apis.paths.response_body_post_ipv4_format_response_body_for_content_types import ResponseBodyPostIpv4FormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ipv6_format_request_body import RequestBodyPostIpv6FormatRequestBody -from unit_test_api.apis.paths.response_body_post_ipv6_format_response_body_for_content_types import ResponseBodyPostIpv6FormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_hostname_format_request_body import RequestBodyPostHostnameFormatRequestBody -from unit_test_api.apis.paths.response_body_post_hostname_format_response_body_for_content_types import ResponseBodyPostHostnameFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_date_time_format_request_body import RequestBodyPostDateTimeFormatRequestBody -from unit_test_api.apis.paths.response_body_post_date_time_format_response_body_for_content_types import ResponseBodyPostDateTimeFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_json_pointer_format_request_body import RequestBodyPostJsonPointerFormatRequestBody -from unit_test_api.apis.paths.response_body_post_json_pointer_format_response_body_for_content_types import ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_uri_format_request_body import RequestBodyPostUriFormatRequestBody -from unit_test_api.apis.paths.response_body_post_uri_format_response_body_for_content_types import ResponseBodyPostUriFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_uri_reference_format_request_body import RequestBodyPostUriReferenceFormatRequestBody -from unit_test_api.apis.paths.response_body_post_uri_reference_format_response_body_for_content_types import ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_uri_template_format_request_body import RequestBodyPostUriTemplateFormatRequestBody -from unit_test_api.apis.paths.response_body_post_uri_template_format_response_body_for_content_types import ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_nested_items_request_body import RequestBodyPostNestedItemsRequestBody -from unit_test_api.apis.paths.response_body_post_nested_items_response_body_for_content_types import ResponseBodyPostNestedItemsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maximum_validation_request_body import RequestBodyPostMaximumValidationRequestBody -from unit_test_api.apis.paths.response_body_post_maximum_validation_response_body_for_content_types import ResponseBodyPostMaximumValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.apis.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maxitems_validation_request_body import RequestBodyPostMaxitemsValidationRequestBody -from unit_test_api.apis.paths.response_body_post_maxitems_validation_response_body_for_content_types import ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maxlength_validation_request_body import RequestBodyPostMaxlengthValidationRequestBody -from unit_test_api.apis.paths.response_body_post_maxlength_validation_response_body_for_content_types import ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maxproperties_validation_request_body import RequestBodyPostMaxpropertiesValidationRequestBody -from unit_test_api.apis.paths.response_body_post_maxproperties_validation_response_body_for_content_types import ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.apis.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_minimum_validation_request_body import RequestBodyPostMinimumValidationRequestBody -from unit_test_api.apis.paths.response_body_post_minimum_validation_response_body_for_content_types import ResponseBodyPostMinimumValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_minimum_validation_with_signed_integer_request_body import RequestBodyPostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.apis.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_minitems_validation_request_body import RequestBodyPostMinitemsValidationRequestBody -from unit_test_api.apis.paths.response_body_post_minitems_validation_response_body_for_content_types import ResponseBodyPostMinitemsValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_minlength_validation_request_body import RequestBodyPostMinlengthValidationRequestBody -from unit_test_api.apis.paths.response_body_post_minlength_validation_response_body_for_content_types import ResponseBodyPostMinlengthValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_minproperties_validation_request_body import RequestBodyPostMinpropertiesValidationRequestBody -from unit_test_api.apis.paths.response_body_post_minproperties_validation_response_body_for_content_types import ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_by_int_request_body import RequestBodyPostByIntRequestBody -from unit_test_api.apis.paths.response_body_post_by_int_response_body_for_content_types import ResponseBodyPostByIntResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_by_number_request_body import RequestBodyPostByNumberRequestBody -from unit_test_api.apis.paths.response_body_post_by_number_response_body_for_content_types import ResponseBodyPostByNumberResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_by_small_number_request_body import RequestBodyPostBySmallNumberRequestBody -from unit_test_api.apis.paths.response_body_post_by_small_number_response_body_for_content_types import ResponseBodyPostBySmallNumberResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.apis.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_not_request_body import RequestBodyPostNotRequestBody -from unit_test_api.apis.paths.response_body_post_not_response_body_for_content_types import ResponseBodyPostNotResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_not_more_complex_schema_request_body import RequestBodyPostNotMoreComplexSchemaRequestBody -from unit_test_api.apis.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_forbidden_property_request_body import RequestBodyPostForbiddenPropertyRequestBody -from unit_test_api.apis.paths.response_body_post_forbidden_property_response_body_for_content_types import ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_oneof_request_body import RequestBodyPostOneofRequestBody -from unit_test_api.apis.paths.response_body_post_oneof_response_body_for_content_types import ResponseBodyPostOneofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_oneof_with_base_schema_request_body import RequestBodyPostOneofWithBaseSchemaRequestBody -from unit_test_api.apis.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_oneof_complex_types_request_body import RequestBodyPostOneofComplexTypesRequestBody -from unit_test_api.apis.paths.response_body_post_oneof_complex_types_response_body_for_content_types import ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_oneof_with_empty_schema_request_body import RequestBodyPostOneofWithEmptySchemaRequestBody -from unit_test_api.apis.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_oneof_with_required_request_body import RequestBodyPostOneofWithRequiredRequestBody -from unit_test_api.apis.paths.response_body_post_oneof_with_required_response_body_for_content_types import ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.apis.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_pattern_validation_request_body import RequestBodyPostPatternValidationRequestBody -from unit_test_api.apis.paths.response_body_post_pattern_validation_response_body_for_content_types import ResponseBodyPostPatternValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_pattern_is_not_anchored_request_body import RequestBodyPostPatternIsNotAnchoredRequestBody -from unit_test_api.apis.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_object_properties_validation_request_body import RequestBodyPostObjectPropertiesValidationRequestBody -from unit_test_api.apis.paths.response_body_post_object_properties_validation_response_body_for_content_types import ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_properties_with_escaped_characters_request_body import RequestBodyPostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.apis.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.apis.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_additionalproperties_request_body import RequestBodyPostRefInAdditionalpropertiesRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_items_request_body import RequestBodyPostRefInItemsRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_items_response_body_for_content_types import ResponseBodyPostRefInItemsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_property_request_body import RequestBodyPostRefInPropertyRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_property_response_body_for_content_types import ResponseBodyPostRefInPropertyResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_allof_request_body import RequestBodyPostRefInAllofRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_allof_response_body_for_content_types import ResponseBodyPostRefInAllofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_oneof_request_body import RequestBodyPostRefInOneofRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_oneof_response_body_for_content_types import ResponseBodyPostRefInOneofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_anyof_request_body import RequestBodyPostRefInAnyofRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_anyof_response_body_for_content_types import ResponseBodyPostRefInAnyofResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_ref_in_not_request_body import RequestBodyPostRefInNotRequestBody -from unit_test_api.apis.paths.response_body_post_ref_in_not_response_body_for_content_types import ResponseBodyPostRefInNotResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_required_validation_request_body import RequestBodyPostRequiredValidationRequestBody -from unit_test_api.apis.paths.response_body_post_required_validation_response_body_for_content_types import ResponseBodyPostRequiredValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_required_default_validation_request_body import RequestBodyPostRequiredDefaultValidationRequestBody -from unit_test_api.apis.paths.response_body_post_required_default_validation_response_body_for_content_types import ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_required_with_empty_array_request_body import RequestBodyPostRequiredWithEmptyArrayRequestBody -from unit_test_api.apis.paths.response_body_post_required_with_empty_array_response_body_for_content_types import ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_required_with_escaped_characters_request_body import RequestBodyPostRequiredWithEscapedCharactersRequestBody -from unit_test_api.apis.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_integer_type_matches_integers_request_body import RequestBodyPostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.apis.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_number_type_matches_numbers_request_body import RequestBodyPostNumberTypeMatchesNumbersRequestBody -from unit_test_api.apis.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_string_type_matches_strings_request_body import RequestBodyPostStringTypeMatchesStringsRequestBody -from unit_test_api.apis.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_object_type_matches_objects_request_body import RequestBodyPostObjectTypeMatchesObjectsRequestBody -from unit_test_api.apis.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_boolean_type_matches_booleans_request_body import RequestBodyPostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.apis.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_null_type_matches_only_the_null_object_request_body import RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.apis.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_array_type_matches_arrays_request_body import RequestBodyPostArrayTypeMatchesArraysRequestBody -from unit_test_api.apis.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_uniqueitems_validation_request_body import RequestBodyPostUniqueitemsValidationRequestBody -from unit_test_api.apis.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes -from unit_test_api.apis.paths.request_body_post_uniqueitems_false_validation_request_body import RequestBodyPostUniqueitemsFalseValidationRequestBody -from unit_test_api.apis.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes - -PathToApi = typing_extensions.TypedDict( - 'PathToApi', - { - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_REQUEST_BODY: RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_REQUEST_BODY: RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_REQUEST_BODY: RequestBodyPostAllofRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_SIMPLE_TYPES_REQUEST_BODY: RequestBodyPostAllofSimpleTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_SIMPLE_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithOneEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_REQUEST_BODY: RequestBodyPostAllofWithTwoEmptySchemasRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_REQUEST_BODY: RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_REQUEST_BODY: RequestBodyPostAnyofRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostAnyofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_COMPLEX_TYPES_REQUEST_BODY: RequestBodyPostAnyofComplexTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAnyofWithOneEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_REQUEST_BODY: RequestBodyPostInvalidStringValueForDefaultRequestBody, - PathValues.RESPONSE_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_REQUEST_BODY: RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PathValues.RESPONSE_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_SIMPLE_ENUM_VALIDATION_REQUEST_BODY: RequestBodyPostSimpleEnumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_SIMPLE_ENUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUMS_IN_PROPERTIES_REQUEST_BODY: RequestBodyPostEnumsInPropertiesRequestBody, - PathValues.RESPONSE_BODY_POST_ENUMS_IN_PROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostEnumWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0REQUEST_BODY: RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1REQUEST_BODY: RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_REQUEST_BODY: RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_REQUEST_BODY: RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NUL_CHARACTERS_IN_STRINGS_REQUEST_BODY: RequestBodyPostNulCharactersInStringsRequestBody, - PathValues.RESPONSE_BODY_POST_NUL_CHARACTERS_IN_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_EMAIL_FORMAT_REQUEST_BODY: RequestBodyPostEmailFormatRequestBody, - PathValues.RESPONSE_BODY_POST_EMAIL_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEmailFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_IPV4FORMAT_REQUEST_BODY: RequestBodyPostIpv4FormatRequestBody, - PathValues.RESPONSE_BODY_POST_IPV4FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIpv4FormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_IPV6FORMAT_REQUEST_BODY: RequestBodyPostIpv6FormatRequestBody, - PathValues.RESPONSE_BODY_POST_IPV6FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIpv6FormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_HOSTNAME_FORMAT_REQUEST_BODY: RequestBodyPostHostnameFormatRequestBody, - PathValues.RESPONSE_BODY_POST_HOSTNAME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostHostnameFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_DATE_TIME_FORMAT_REQUEST_BODY: RequestBodyPostDateTimeFormatRequestBody, - PathValues.RESPONSE_BODY_POST_DATE_TIME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_JSON_POINTER_FORMAT_REQUEST_BODY: RequestBodyPostJsonPointerFormatRequestBody, - PathValues.RESPONSE_BODY_POST_JSON_POINTER_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_FORMAT_REQUEST_BODY: RequestBodyPostUriFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_REFERENCE_FORMAT_REQUEST_BODY: RequestBodyPostUriReferenceFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_REFERENCE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_TEMPLATE_FORMAT_REQUEST_BODY: RequestBodyPostUriTemplateFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_TEMPLATE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ITEMS_REQUEST_BODY: RequestBodyPostNestedItemsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedItemsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_REQUEST_BODY: RequestBodyPostMaximumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaximumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_REQUEST_BODY: RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, - PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostMaxitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXLENGTH_VALIDATION_REQUEST_BODY: RequestBodyPostMaxlengthValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXPROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostMaxpropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_REQUEST_BODY: RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PathValues.RESPONSE_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_REQUEST_BODY: RequestBodyPostMinimumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinimumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_REQUEST_BODY: RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, - PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostMinitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINLENGTH_VALIDATION_REQUEST_BODY: RequestBodyPostMinlengthValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINPROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostMinpropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_INT_REQUEST_BODY: RequestBodyPostByIntRequestBody, - PathValues.RESPONSE_BODY_POST_BY_INT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostByIntResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_NUMBER_REQUEST_BODY: RequestBodyPostByNumberRequestBody, - PathValues.RESPONSE_BODY_POST_BY_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostByNumberResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_SMALL_NUMBER_REQUEST_BODY: RequestBodyPostBySmallNumberRequestBody, - PathValues.RESPONSE_BODY_POST_BY_SMALL_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostBySmallNumberResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_REQUEST_BODY: RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PathValues.RESPONSE_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NOT_REQUEST_BODY: RequestBodyPostNotRequestBody, - PathValues.RESPONSE_BODY_POST_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNotResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_REQUEST_BODY: RequestBodyPostNotMoreComplexSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_FORBIDDEN_PROPERTY_REQUEST_BODY: RequestBodyPostForbiddenPropertyRequestBody, - PathValues.RESPONSE_BODY_POST_FORBIDDEN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_REQUEST_BODY: RequestBodyPostOneofRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_COMPLEX_TYPES_REQUEST_BODY: RequestBodyPostOneofComplexTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY: RequestBodyPostOneofWithRequiredRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY: RequestBodyPostPatternValidationRequestBody, - PathValues.RESPONSE_BODY_POST_PATTERN_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPatternValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PATTERN_IS_NOT_ANCHORED_REQUEST_BODY: RequestBodyPostPatternIsNotAnchoredRequestBody, - PathValues.RESPONSE_BODY_POST_PATTERN_IS_NOT_ANCHORED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_OBJECT_PROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostObjectPropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_OBJECT_PROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostPropertiesWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_REQUEST_BODY: RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, - PathValues.RESPONSE_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ADDITIONALPROPERTIES_REQUEST_BODY: RequestBodyPostRefInAdditionalpropertiesRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ADDITIONALPROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ITEMS_REQUEST_BODY: RequestBodyPostRefInItemsRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInItemsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_PROPERTY_REQUEST_BODY: RequestBodyPostRefInPropertyRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInPropertyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ALLOF_REQUEST_BODY: RequestBodyPostRefInAllofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAllofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ONEOF_REQUEST_BODY: RequestBodyPostRefInOneofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ANYOF_REQUEST_BODY: RequestBodyPostRefInAnyofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAnyofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_NOT_REQUEST_BODY: RequestBodyPostRefInNotRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInNotResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_VALIDATION_REQUEST_BODY: RequestBodyPostRequiredValidationRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_DEFAULT_VALIDATION_REQUEST_BODY: RequestBodyPostRequiredDefaultValidationRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY: RequestBodyPostRequiredWithEmptyArrayRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostRequiredWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY: RequestBodyPostIntegerTypeMatchesIntegersRequestBody, - PathValues.RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY: RequestBodyPostNumberTypeMatchesNumbersRequestBody, - PathValues.RESPONSE_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_STRING_TYPE_MATCHES_STRINGS_REQUEST_BODY: RequestBodyPostStringTypeMatchesStringsRequestBody, - PathValues.RESPONSE_BODY_POST_STRING_TYPE_MATCHES_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_REQUEST_BODY: RequestBodyPostObjectTypeMatchesObjectsRequestBody, - PathValues.RESPONSE_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_REQUEST_BODY: RequestBodyPostBooleanTypeMatchesBooleansRequestBody, - PathValues.RESPONSE_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_REQUEST_BODY: RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, - PathValues.RESPONSE_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_REQUEST_BODY: RequestBodyPostArrayTypeMatchesArraysRequestBody, - PathValues.RESPONSE_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_UNIQUEITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostUniqueitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_REQUEST_BODY: RequestBodyPostUniqueitemsFalseValidationRequestBody, - PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, - } -) - -path_to_api = PathToApi( - { - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_REQUEST_BODY: RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_REQUEST_BODY: RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_REQUEST_BODY: RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_REQUEST_BODY: RequestBodyPostAllofRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_SIMPLE_TYPES_REQUEST_BODY: RequestBodyPostAllofSimpleTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_SIMPLE_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithOneEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_REQUEST_BODY: RequestBodyPostAllofWithTwoEmptySchemasRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAllofWithTheLastEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_REQUEST_BODY: RequestBodyPostAllofCombinedWithAnyofOneofRequestBody, - PathValues.RESPONSE_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_REQUEST_BODY: RequestBodyPostAnyofRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostAnyofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_COMPLEX_TYPES_REQUEST_BODY: RequestBodyPostAnyofComplexTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostAnyofWithOneEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_REQUEST_BODY: RequestBodyPostInvalidStringValueForDefaultRequestBody, - PathValues.RESPONSE_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_REQUEST_BODY: RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PathValues.RESPONSE_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_SIMPLE_ENUM_VALIDATION_REQUEST_BODY: RequestBodyPostSimpleEnumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_SIMPLE_ENUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUMS_IN_PROPERTIES_REQUEST_BODY: RequestBodyPostEnumsInPropertiesRequestBody, - PathValues.RESPONSE_BODY_POST_ENUMS_IN_PROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostEnumWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0REQUEST_BODY: RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1REQUEST_BODY: RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_REQUEST_BODY: RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_REQUEST_BODY: RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody, - PathValues.RESPONSE_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NUL_CHARACTERS_IN_STRINGS_REQUEST_BODY: RequestBodyPostNulCharactersInStringsRequestBody, - PathValues.RESPONSE_BODY_POST_NUL_CHARACTERS_IN_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_EMAIL_FORMAT_REQUEST_BODY: RequestBodyPostEmailFormatRequestBody, - PathValues.RESPONSE_BODY_POST_EMAIL_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostEmailFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_IPV4FORMAT_REQUEST_BODY: RequestBodyPostIpv4FormatRequestBody, - PathValues.RESPONSE_BODY_POST_IPV4FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIpv4FormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_IPV6FORMAT_REQUEST_BODY: RequestBodyPostIpv6FormatRequestBody, - PathValues.RESPONSE_BODY_POST_IPV6FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIpv6FormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_HOSTNAME_FORMAT_REQUEST_BODY: RequestBodyPostHostnameFormatRequestBody, - PathValues.RESPONSE_BODY_POST_HOSTNAME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostHostnameFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_DATE_TIME_FORMAT_REQUEST_BODY: RequestBodyPostDateTimeFormatRequestBody, - PathValues.RESPONSE_BODY_POST_DATE_TIME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostDateTimeFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_JSON_POINTER_FORMAT_REQUEST_BODY: RequestBodyPostJsonPointerFormatRequestBody, - PathValues.RESPONSE_BODY_POST_JSON_POINTER_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_FORMAT_REQUEST_BODY: RequestBodyPostUriFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_REFERENCE_FORMAT_REQUEST_BODY: RequestBodyPostUriReferenceFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_REFERENCE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_URI_TEMPLATE_FORMAT_REQUEST_BODY: RequestBodyPostUriTemplateFormatRequestBody, - PathValues.RESPONSE_BODY_POST_URI_TEMPLATE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ITEMS_REQUEST_BODY: RequestBodyPostNestedItemsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedItemsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_REQUEST_BODY: RequestBodyPostMaximumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaximumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_REQUEST_BODY: RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody, - PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostMaxitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXLENGTH_VALIDATION_REQUEST_BODY: RequestBodyPostMaxlengthValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXPROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostMaxpropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MAXPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_REQUEST_BODY: RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PathValues.RESPONSE_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_REQUEST_BODY: RequestBodyPostMinimumValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinimumValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_REQUEST_BODY: RequestBodyPostMinimumValidationWithSignedIntegerRequestBody, - PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostMinitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINLENGTH_VALIDATION_REQUEST_BODY: RequestBodyPostMinlengthValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinlengthValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_MINPROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostMinpropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_MINPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_INT_REQUEST_BODY: RequestBodyPostByIntRequestBody, - PathValues.RESPONSE_BODY_POST_BY_INT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostByIntResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_NUMBER_REQUEST_BODY: RequestBodyPostByNumberRequestBody, - PathValues.RESPONSE_BODY_POST_BY_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostByNumberResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BY_SMALL_NUMBER_REQUEST_BODY: RequestBodyPostBySmallNumberRequestBody, - PathValues.RESPONSE_BODY_POST_BY_SMALL_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostBySmallNumberResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_REQUEST_BODY: RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PathValues.RESPONSE_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NOT_REQUEST_BODY: RequestBodyPostNotRequestBody, - PathValues.RESPONSE_BODY_POST_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNotResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_REQUEST_BODY: RequestBodyPostNotMoreComplexSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_FORBIDDEN_PROPERTY_REQUEST_BODY: RequestBodyPostForbiddenPropertyRequestBody, - PathValues.RESPONSE_BODY_POST_FORBIDDEN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_REQUEST_BODY: RequestBodyPostOneofRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_BASE_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithBaseSchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_COMPLEX_TYPES_REQUEST_BODY: RequestBodyPostOneofComplexTypesRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY: RequestBodyPostOneofWithEmptySchemaRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY: RequestBodyPostOneofWithRequiredRequestBody, - PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY: RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody, - PathValues.RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY: RequestBodyPostPatternValidationRequestBody, - PathValues.RESPONSE_BODY_POST_PATTERN_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPatternValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PATTERN_IS_NOT_ANCHORED_REQUEST_BODY: RequestBodyPostPatternIsNotAnchoredRequestBody, - PathValues.RESPONSE_BODY_POST_PATTERN_IS_NOT_ANCHORED_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_OBJECT_PROPERTIES_VALIDATION_REQUEST_BODY: RequestBodyPostObjectPropertiesValidationRequestBody, - PathValues.RESPONSE_BODY_POST_OBJECT_PROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostPropertiesWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_REQUEST_BODY: RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody, - PathValues.RESPONSE_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ADDITIONALPROPERTIES_REQUEST_BODY: RequestBodyPostRefInAdditionalpropertiesRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ADDITIONALPROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ITEMS_REQUEST_BODY: RequestBodyPostRefInItemsRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInItemsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_PROPERTY_REQUEST_BODY: RequestBodyPostRefInPropertyRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInPropertyResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ALLOF_REQUEST_BODY: RequestBodyPostRefInAllofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAllofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ONEOF_REQUEST_BODY: RequestBodyPostRefInOneofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInOneofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_ANYOF_REQUEST_BODY: RequestBodyPostRefInAnyofRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInAnyofResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REF_IN_NOT_REQUEST_BODY: RequestBodyPostRefInNotRequestBody, - PathValues.RESPONSE_BODY_POST_REF_IN_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRefInNotResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_VALIDATION_REQUEST_BODY: RequestBodyPostRequiredValidationRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_DEFAULT_VALIDATION_REQUEST_BODY: RequestBodyPostRequiredDefaultValidationRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY: RequestBodyPostRequiredWithEmptyArrayRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY: RequestBodyPostRequiredWithEscapedCharactersRequestBody, - PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY: RequestBodyPostIntegerTypeMatchesIntegersRequestBody, - PathValues.RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY: RequestBodyPostNumberTypeMatchesNumbersRequestBody, - PathValues.RESPONSE_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_STRING_TYPE_MATCHES_STRINGS_REQUEST_BODY: RequestBodyPostStringTypeMatchesStringsRequestBody, - PathValues.RESPONSE_BODY_POST_STRING_TYPE_MATCHES_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_REQUEST_BODY: RequestBodyPostObjectTypeMatchesObjectsRequestBody, - PathValues.RESPONSE_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_REQUEST_BODY: RequestBodyPostBooleanTypeMatchesBooleansRequestBody, - PathValues.RESPONSE_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_REQUEST_BODY: RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody, - PathValues.RESPONSE_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_REQUEST_BODY: RequestBodyPostArrayTypeMatchesArraysRequestBody, - PathValues.RESPONSE_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_UNIQUEITEMS_VALIDATION_REQUEST_BODY: RequestBodyPostUniqueitemsValidationRequestBody, - PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes, - PathValues.REQUEST_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_REQUEST_BODY: RequestBodyPostUniqueitemsFalseValidationRequestBody, - PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES: ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes, - } -) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/__init__.py deleted file mode 100644 index 53ee69932fa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.apis.path_to_api import path_to_api diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py deleted file mode 100644 index b192522f2aa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post import ApiForpost - - -class RequestBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py deleted file mode 100644 index 451e8f90027..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post import ApiForpost - - -class RequestBodyPostAdditionalpropertiesAreAllowedByDefaultRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py deleted file mode 100644 index c52850fbd68..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post import ApiForpost - - -class RequestBodyPostAdditionalpropertiesCanExistByItselfRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py deleted file mode 100644 index ce1a4fdad65..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post import ApiForpost - - -class RequestBodyPostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py deleted file mode 100644 index 6793b00407b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_combined_with_anyof_oneof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post import ApiForpost - - -class RequestBodyPostAllofCombinedWithAnyofOneofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_request_body.py deleted file mode 100644 index 37c84da359b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_request_body.post import ApiForpost - - -class RequestBodyPostAllofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py deleted file mode 100644 index 9fc93cccdbc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_simple_types_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_simple_types_request_body.post import ApiForpost - - -class RequestBodyPostAllofSimpleTypesRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py deleted file mode 100644 index 86134ff5215..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_base_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.post import ApiForpost - - -class RequestBodyPostAllofWithBaseSchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py deleted file mode 100644 index 2a53c4f4e6d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.post import ApiForpost - - -class RequestBodyPostAllofWithOneEmptySchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py deleted file mode 100644 index d7e39a3366f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_first_empty_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post import ApiForpost - - -class RequestBodyPostAllofWithTheFirstEmptySchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py deleted file mode 100644 index e89f23b2e65..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_the_last_empty_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post import ApiForpost - - -class RequestBodyPostAllofWithTheLastEmptySchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py deleted file mode 100644 index 52d37e53682..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_allof_with_two_empty_schemas_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.post import ApiForpost - - -class RequestBodyPostAllofWithTwoEmptySchemasRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py deleted file mode 100644 index e0451e54403..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_complex_types_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body.post import ApiForpost - - -class RequestBodyPostAnyofComplexTypesRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_request_body.py deleted file mode 100644 index 664362a7a17..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_anyof_request_body.post import ApiForpost - - -class RequestBodyPostAnyofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py deleted file mode 100644 index 7cb12e0242f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_base_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.post import ApiForpost - - -class RequestBodyPostAnyofWithBaseSchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py deleted file mode 100644 index debf0a4001d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_anyof_with_one_empty_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.post import ApiForpost - - -class RequestBodyPostAnyofWithOneEmptySchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py deleted file mode 100644 index 07f36e7221d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_array_type_matches_arrays_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.post import ApiForpost - - -class RequestBodyPostArrayTypeMatchesArraysRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py deleted file mode 100644 index 8d84adf9461..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_boolean_type_matches_booleans_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.post import ApiForpost - - -class RequestBodyPostBooleanTypeMatchesBooleansRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_int_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_int_request_body.py deleted file mode 100644 index dd56fe4d763..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_int_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_by_int_request_body.post import ApiForpost - - -class RequestBodyPostByIntRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_number_request_body.py deleted file mode 100644 index 1c4479a5830..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_number_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_by_number_request_body.post import ApiForpost - - -class RequestBodyPostByNumberRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py deleted file mode 100644 index a02655bdcf4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_by_small_number_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_by_small_number_request_body.post import ApiForpost - - -class RequestBodyPostBySmallNumberRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py deleted file mode 100644 index 7a8bcf9dd3c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_date_time_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_date_time_format_request_body.post import ApiForpost - - -class RequestBodyPostDateTimeFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_email_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_email_format_request_body.py deleted file mode 100644 index d981e181d71..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_email_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_email_format_request_body.post import ApiForpost - - -class RequestBodyPostEmailFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py deleted file mode 100644 index 2ad5fc633c5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with0_does_not_match_false_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.post import ApiForpost - - -class RequestBodyPostEnumWith0DoesNotMatchFalseRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py deleted file mode 100644 index e839c2072b6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with1_does_not_match_true_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.post import ApiForpost - - -class RequestBodyPostEnumWith1DoesNotMatchTrueRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py deleted file mode 100644 index 7f2d1af225d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_escaped_characters_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.post import ApiForpost - - -class RequestBodyPostEnumWithEscapedCharactersRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py deleted file mode 100644 index 3a411072adf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_false_does_not_match0_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.post import ApiForpost - - -class RequestBodyPostEnumWithFalseDoesNotMatch0RequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py deleted file mode 100644 index b4de11a45aa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enum_with_true_does_not_match1_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.post import ApiForpost - - -class RequestBodyPostEnumWithTrueDoesNotMatch1RequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py deleted file mode 100644 index 2691381350b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_enums_in_properties_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_enums_in_properties_request_body.post import ApiForpost - - -class RequestBodyPostEnumsInPropertiesRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py deleted file mode 100644 index 2d47b6c3b2e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_forbidden_property_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post import ApiForpost - - -class RequestBodyPostForbiddenPropertyRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py deleted file mode 100644 index 7c7f8a231e5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_hostname_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_hostname_format_request_body.post import ApiForpost - - -class RequestBodyPostHostnameFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py deleted file mode 100644 index 77edb2b06bb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_integer_type_matches_integers_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.post import ApiForpost - - -class RequestBodyPostIntegerTypeMatchesIntegersRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py deleted file mode 100644 index 5941f7771dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post import ApiForpost - - -class RequestBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py deleted file mode 100644 index 4ba3eccbfcb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_invalid_string_value_for_default_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.post import ApiForpost - - -class RequestBodyPostInvalidStringValueForDefaultRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py deleted file mode 100644 index 3a08ac42fb7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv4_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ipv4_format_request_body.post import ApiForpost - - -class RequestBodyPostIpv4FormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py deleted file mode 100644 index a4c77959125..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ipv6_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ipv6_format_request_body.post import ApiForpost - - -class RequestBodyPostIpv6FormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py deleted file mode 100644 index 72c1b75f118..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_json_pointer_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_json_pointer_format_request_body.post import ApiForpost - - -class RequestBodyPostJsonPointerFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py deleted file mode 100644 index be4ee24b7bf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maximum_validation_request_body.post import ApiForpost - - -class RequestBodyPostMaximumValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py deleted file mode 100644 index 8320d0e690a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post import ApiForpost - - -class RequestBodyPostMaximumValidationWithUnsignedIntegerRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py deleted file mode 100644 index 0cd52b5704a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxitems_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maxitems_validation_request_body.post import ApiForpost - - -class RequestBodyPostMaxitemsValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py deleted file mode 100644 index 3bbe70bf34a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxlength_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maxlength_validation_request_body.post import ApiForpost - - -class RequestBodyPostMaxlengthValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py deleted file mode 100644 index 98a7f6edf79..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post import ApiForpost - - -class RequestBodyPostMaxproperties0MeansTheObjectIsEmptyRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py deleted file mode 100644 index d4e696fd84a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_maxproperties_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body.post import ApiForpost - - -class RequestBodyPostMaxpropertiesValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py deleted file mode 100644 index 027c18ffdef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_minimum_validation_request_body.post import ApiForpost - - -class RequestBodyPostMinimumValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py deleted file mode 100644 index dafbf06e919..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minimum_validation_with_signed_integer_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post import ApiForpost - - -class RequestBodyPostMinimumValidationWithSignedIntegerRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py deleted file mode 100644 index 799cb6d8c9b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minitems_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_minitems_validation_request_body.post import ApiForpost - - -class RequestBodyPostMinitemsValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py deleted file mode 100644 index 5998484905d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minlength_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_minlength_validation_request_body.post import ApiForpost - - -class RequestBodyPostMinlengthValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py deleted file mode 100644 index 2198665c3b1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_minproperties_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_minproperties_validation_request_body.post import ApiForpost - - -class RequestBodyPostMinpropertiesValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 65e76d896e8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post import ApiForpost - - -class RequestBodyPostNestedAllofToCheckValidationSemanticsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py deleted file mode 100644 index 806340cb355..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post import ApiForpost - - -class RequestBodyPostNestedAnyofToCheckValidationSemanticsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py deleted file mode 100644 index a32286fd144..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_items_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_nested_items_request_body.post import ApiForpost - - -class RequestBodyPostNestedItemsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py deleted file mode 100644 index e88c0c4cfd7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post import ApiForpost - - -class RequestBodyPostNestedOneofToCheckValidationSemanticsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py deleted file mode 100644 index 5b3f9fe9695..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_more_complex_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post import ApiForpost - - -class RequestBodyPostNotMoreComplexSchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_request_body.py deleted file mode 100644 index 631de4606c8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_not_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_not_request_body.post import ApiForpost - - -class RequestBodyPostNotRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py deleted file mode 100644 index 3b58e5d911c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_nul_characters_in_strings_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.post import ApiForpost - - -class RequestBodyPostNulCharactersInStringsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py deleted file mode 100644 index a1b6fef89e0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_null_type_matches_only_the_null_object_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post import ApiForpost - - -class RequestBodyPostNullTypeMatchesOnlyTheNullObjectRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py deleted file mode 100644 index 406a6293d32..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_number_type_matches_numbers_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.post import ApiForpost - - -class RequestBodyPostNumberTypeMatchesNumbersRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py deleted file mode 100644 index 5d2954070a1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_properties_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_object_properties_validation_request_body.post import ApiForpost - - -class RequestBodyPostObjectPropertiesValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py deleted file mode 100644 index 44a8c119ba0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_object_type_matches_objects_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.post import ApiForpost - - -class RequestBodyPostObjectTypeMatchesObjectsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py deleted file mode 100644 index a717308f2ca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_complex_types_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import ApiForpost - - -class RequestBodyPostOneofComplexTypesRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_request_body.py deleted file mode 100644 index 45d31d7fdf6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_oneof_request_body.post import ApiForpost - - -class RequestBodyPostOneofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py deleted file mode 100644 index 4f599245d02..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_base_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import ApiForpost - - -class RequestBodyPostOneofWithBaseSchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py deleted file mode 100644 index 2ec2d18c535..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_empty_schema_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import ApiForpost - - -class RequestBodyPostOneofWithEmptySchemaRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py deleted file mode 100644 index 774cf6dc1ac..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_oneof_with_required_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import ApiForpost - - -class RequestBodyPostOneofWithRequiredRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py deleted file mode 100644 index 06aca1f2b3e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_is_not_anchored_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import ApiForpost - - -class RequestBodyPostPatternIsNotAnchoredRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py deleted file mode 100644 index 5ddc1ec9b7c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_pattern_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import ApiForpost - - -class RequestBodyPostPatternValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py deleted file mode 100644 index dd948001468..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_properties_with_escaped_characters_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import ApiForpost - - -class RequestBodyPostPropertiesWithEscapedCharactersRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py deleted file mode 100644 index c211121f9db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post import ApiForpost - - -class RequestBodyPostPropertyNamedRefThatIsNotAReferenceRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py deleted file mode 100644 index b74804c5e79..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_additionalproperties_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.post import ApiForpost - - -class RequestBodyPostRefInAdditionalpropertiesRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py deleted file mode 100644 index 4720ef7849b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_allof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_allof_request_body.post import ApiForpost - - -class RequestBodyPostRefInAllofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py deleted file mode 100644 index c86e5289609..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_anyof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body.post import ApiForpost - - -class RequestBodyPostRefInAnyofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py deleted file mode 100644 index 1552ea32ee6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_items_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_items_request_body.post import ApiForpost - - -class RequestBodyPostRefInItemsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py deleted file mode 100644 index 12dbc3510d7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_not_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_not_request_body.post import ApiForpost - - -class RequestBodyPostRefInNotRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py deleted file mode 100644 index 3e66c6cef48..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_oneof_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body.post import ApiForpost - - -class RequestBodyPostRefInOneofRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py deleted file mode 100644 index 9950d6d0854..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_ref_in_property_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_ref_in_property_request_body.post import ApiForpost - - -class RequestBodyPostRefInPropertyRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py deleted file mode 100644 index f000c3cdc89..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_default_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import ApiForpost - - -class RequestBodyPostRequiredDefaultValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py deleted file mode 100644 index f31a3846f3f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_required_validation_request_body.post import ApiForpost - - -class RequestBodyPostRequiredValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py deleted file mode 100644 index eb7c393317f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_empty_array_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import ApiForpost - - -class RequestBodyPostRequiredWithEmptyArrayRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py deleted file mode 100644 index 2098fa9255d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_required_with_escaped_characters_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import ApiForpost - - -class RequestBodyPostRequiredWithEscapedCharactersRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py deleted file mode 100644 index 867da55645d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_simple_enum_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import ApiForpost - - -class RequestBodyPostSimpleEnumValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py deleted file mode 100644 index 8fecfc63a8c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_string_type_matches_strings_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import ApiForpost - - -class RequestBodyPostStringTypeMatchesStringsRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py deleted file mode 100644 index f661679de9f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import ApiForpost - - -class RequestBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py deleted file mode 100644 index 59cd97a909c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_false_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.post import ApiForpost - - -class RequestBodyPostUniqueitemsFalseValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py deleted file mode 100644 index 3491c6ceb9b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uniqueitems_validation_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.post import ApiForpost - - -class RequestBodyPostUniqueitemsValidationRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py deleted file mode 100644 index efed57abe10..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_uri_format_request_body.post import ApiForpost - - -class RequestBodyPostUriFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py deleted file mode 100644 index 42007af52dc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_reference_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_uri_reference_format_request_body.post import ApiForpost - - -class RequestBodyPostUriReferenceFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py deleted file mode 100644 index 91da7cc9196..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/request_body_post_uri_template_format_request_body.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.request_body_post_uri_template_format_request_body.post import ApiForpost - - -class RequestBodyPostUriTemplateFormatRequestBody( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py deleted file mode 100644 index 40fb8b563e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py deleted file mode 100644 index 76fa69d7867..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py deleted file mode 100644 index 745ec3b920c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py deleted file mode 100644 index 84f7d2c57f2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py deleted file mode 100644 index 48e10e30ddc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofCombinedWithAnyofOneofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py deleted file mode 100644 index b33146d83bd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py deleted file mode 100644 index eed89884778..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_simple_types_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofSimpleTypesResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 9773d68717f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofWithBaseSchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index cfbab796719..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 4ef24243e38..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 6a072308b9e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofWithTheLastEmptySchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py deleted file mode 100644 index cb2d392a271..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAllofWithTwoEmptySchemasResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py deleted file mode 100644 index 57c04635509..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAnyofComplexTypesResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py deleted file mode 100644 index 9548bd80a81..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAnyofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index 9a9acdee10f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAnyofWithBaseSchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 1e7d7dd5038..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostAnyofWithOneEmptySchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py deleted file mode 100644 index 234e28085ab..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostArrayTypeMatchesArraysResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py deleted file mode 100644 index d9c89215c63..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostBooleanTypeMatchesBooleansResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py deleted file mode 100644 index c24958f9e98..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_int_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostByIntResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py deleted file mode 100644 index b25ffaf327b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_number_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostByNumberResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py deleted file mode 100644 index ebd44f5eacb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_by_small_number_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostBySmallNumberResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py deleted file mode 100644 index e94b0c25526..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_date_time_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostDateTimeFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py deleted file mode 100644 index fd0f359da10..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_email_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEmailFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py deleted file mode 100644 index 57ad82fd774..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py deleted file mode 100644 index 72d19978383..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index c8305686f73..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumWithEscapedCharactersResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py deleted file mode 100644 index 05231260c73..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py deleted file mode 100644 index bea4b3e3f62..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py deleted file mode 100644 index 0edfd61b881..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_enums_in_properties_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostEnumsInPropertiesResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py deleted file mode 100644 index 5393f81369b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_forbidden_property_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostForbiddenPropertyResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py deleted file mode 100644 index 780d18a115b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_hostname_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostHostnameFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py deleted file mode 100644 index 28ace3c210f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostIntegerTypeMatchesIntegersResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py deleted file mode 100644 index b4f0e5ace74..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py deleted file mode 100644 index a9a3fcce75c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostInvalidStringValueForDefaultResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py deleted file mode 100644 index 5c2a095c50e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv4_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostIpv4FormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py deleted file mode 100644 index 231daa31e19..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ipv6_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostIpv6FormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py deleted file mode 100644 index 14fe52abf3a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_json_pointer_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostJsonPointerFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py deleted file mode 100644 index 135c48eb886..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaximumValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py deleted file mode 100644 index 0b9f4c65850..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py deleted file mode 100644 index f650e8dbda7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaxitemsValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py deleted file mode 100644 index e300e8a9cb1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaxlengthValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py deleted file mode 100644 index ed154e366dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py deleted file mode 100644 index 7bbc0d7dd21..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_maxproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMaxpropertiesValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py deleted file mode 100644 index 5db44592d23..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMinimumValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py deleted file mode 100644 index d33537118b2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMinimumValidationWithSignedIntegerResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py deleted file mode 100644 index 62e83546f04..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMinitemsValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py deleted file mode 100644 index c33c6ff17c1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minlength_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMinlengthValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py deleted file mode 100644 index 7cdf0b9ac7d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_minproperties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostMinpropertiesValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 0268fe25aa8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 68ad0f0a4de..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py deleted file mode 100644 index 78492c45a53..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_items_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNestedItemsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py deleted file mode 100644 index 18390d6cddf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py deleted file mode 100644 index 2321185dcc9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_more_complex_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNotMoreComplexSchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py deleted file mode 100644 index 4479983190b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_not_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNotResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py deleted file mode 100644 index c1c7cb23cd3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNulCharactersInStringsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py deleted file mode 100644 index 0d4058d552c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py deleted file mode 100644 index 62135db0c75..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostNumberTypeMatchesNumbersResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py deleted file mode 100644 index 141786c230e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_properties_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostObjectPropertiesValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py deleted file mode 100644 index 211c386ed61..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_object_type_matches_objects_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostObjectTypeMatchesObjectsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py deleted file mode 100644 index f56b2bef461..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_complex_types_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostOneofComplexTypesResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py deleted file mode 100644 index b88819ef179..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostOneofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py deleted file mode 100644 index fcdbccfce40..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostOneofWithBaseSchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py deleted file mode 100644 index 02e6abc4b11..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostOneofWithEmptySchemaResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py deleted file mode 100644 index f5a9664a518..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_oneof_with_required_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostOneofWithRequiredResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py deleted file mode 100644 index 1a862e844b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostPatternIsNotAnchoredResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py deleted file mode 100644 index 88c3da5de6a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_pattern_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostPatternValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index 081476765eb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostPropertiesWithEscapedCharactersResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py deleted file mode 100644 index 0b75f8b1480..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py deleted file mode 100644 index 94fc9c9da2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInAdditionalpropertiesResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py deleted file mode 100644 index a40dcf8e5ad..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_allof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInAllofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py deleted file mode 100644 index e0f407a0fd0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_anyof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInAnyofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py deleted file mode 100644 index dae8c311469..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_items_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInItemsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py deleted file mode 100644 index 383fa2cf0e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_not_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInNotResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py deleted file mode 100644 index 82d7f902729..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_oneof_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInOneofResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py deleted file mode 100644 index b2d7ad44682..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_ref_in_property_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRefInPropertyResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py deleted file mode 100644 index 51feba56845..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_default_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRequiredDefaultValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py deleted file mode 100644 index b41f1105d73..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRequiredValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py deleted file mode 100644 index 928bbc72a71..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_empty_array_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRequiredWithEmptyArrayResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py deleted file mode 100644 index 50f83818f4b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostRequiredWithEscapedCharactersResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py deleted file mode 100644 index d9e1b211f1c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_simple_enum_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostSimpleEnumValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py deleted file mode 100644 index e7b69a99857..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_string_type_matches_strings_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostStringTypeMatchesStringsResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py deleted file mode 100644 index e591237938e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from 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 import ApiForpost - - -class ResponseBodyPostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py deleted file mode 100644 index 4ed02742f97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostUniqueitemsFalseValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py deleted file mode 100644 index 11ef62e6f60..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uniqueitems_validation_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostUniqueitemsValidationResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py deleted file mode 100644 index a99810c7219..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostUriFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py deleted file mode 100644 index 61ffe53b6cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_reference_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostUriReferenceFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py deleted file mode 100644 index 5a32fe18149..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/paths/response_body_post_uri_template_format_response_body_for_content_types.py +++ /dev/null @@ -1,7 +0,0 @@ -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.post import ApiForpost - - -class ResponseBodyPostUriTemplateFormatResponseBodyForContentTypes( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tag_to_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tag_to_api.py deleted file mode 100644 index a40db5c5f90..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tag_to_api.py +++ /dev/null @@ -1,98 +0,0 @@ -import typing_extensions - -from unit_test_api.apis.tags import TagValues -from unit_test_api.apis.tags.operation_request_body_api import OperationRequestBodyApi -from unit_test_api.apis.tags.path_post_api import PathPostApi -from unit_test_api.apis.tags.content_type_json_api import ContentTypeJsonApi -from unit_test_api.apis.tags.response_content_content_type_schema_api import ResponseContentContentTypeSchemaApi -from unit_test_api.apis.tags.additional_properties_api import AdditionalPropertiesApi -from unit_test_api.apis.tags.all_of_api import AllOfApi -from unit_test_api.apis.tags.any_of_api import AnyOfApi -from unit_test_api.apis.tags.default_api import DefaultApi -from unit_test_api.apis.tags.enum_api import EnumApi -from unit_test_api.apis.tags.format_api import FormatApi -from unit_test_api.apis.tags.items_api import ItemsApi -from unit_test_api.apis.tags.maximum_api import MaximumApi -from unit_test_api.apis.tags.max_items_api import MaxItemsApi -from unit_test_api.apis.tags.max_length_api import MaxLengthApi -from unit_test_api.apis.tags.max_properties_api import MaxPropertiesApi -from unit_test_api.apis.tags.minimum_api import MinimumApi -from unit_test_api.apis.tags.min_items_api import MinItemsApi -from unit_test_api.apis.tags.min_length_api import MinLengthApi -from unit_test_api.apis.tags.min_properties_api import MinPropertiesApi -from unit_test_api.apis.tags.multiple_of_api import MultipleOfApi -from unit_test_api.apis.tags.model_not_api import ModelNotApi -from unit_test_api.apis.tags.one_of_api import OneOfApi -from unit_test_api.apis.tags.pattern_api import PatternApi -from unit_test_api.apis.tags.properties_api import PropertiesApi -from unit_test_api.apis.tags.ref_api import RefApi -from unit_test_api.apis.tags.required_api import RequiredApi -from unit_test_api.apis.tags.type_api import TypeApi -from unit_test_api.apis.tags.unique_items_api import UniqueItemsApi - -TagToApi = typing_extensions.TypedDict( - 'TagToApi', - { - TagValues.OPERATION_REQUEST_BODY: OperationRequestBodyApi, - TagValues.PATH_POST: PathPostApi, - TagValues.CONTENT_TYPE_JSON: ContentTypeJsonApi, - TagValues.RESPONSE_CONTENT_CONTENT_TYPE_SCHEMA: ResponseContentContentTypeSchemaApi, - TagValues.ADDITIONAL_PROPERTIES: AdditionalPropertiesApi, - TagValues.ALL_OF: AllOfApi, - TagValues.ANY_OF: AnyOfApi, - TagValues.DEFAULT: DefaultApi, - TagValues.ENUM: EnumApi, - TagValues.FORMAT: FormatApi, - TagValues.ITEMS: ItemsApi, - TagValues.MAXIMUM: MaximumApi, - TagValues.MAX_ITEMS: MaxItemsApi, - TagValues.MAX_LENGTH: MaxLengthApi, - TagValues.MAX_PROPERTIES: MaxPropertiesApi, - TagValues.MINIMUM: MinimumApi, - TagValues.MIN_ITEMS: MinItemsApi, - TagValues.MIN_LENGTH: MinLengthApi, - TagValues.MIN_PROPERTIES: MinPropertiesApi, - TagValues.MULTIPLE_OF: MultipleOfApi, - TagValues.NOT: ModelNotApi, - TagValues.ONE_OF: OneOfApi, - TagValues.PATTERN: PatternApi, - TagValues.PROPERTIES: PropertiesApi, - TagValues.REF: RefApi, - TagValues.REQUIRED: RequiredApi, - TagValues.TYPE: TypeApi, - TagValues.UNIQUE_ITEMS: UniqueItemsApi, - } -) - -tag_to_api = TagToApi( - { - TagValues.OPERATION_REQUEST_BODY: OperationRequestBodyApi, - TagValues.PATH_POST: PathPostApi, - TagValues.CONTENT_TYPE_JSON: ContentTypeJsonApi, - TagValues.RESPONSE_CONTENT_CONTENT_TYPE_SCHEMA: ResponseContentContentTypeSchemaApi, - TagValues.ADDITIONAL_PROPERTIES: AdditionalPropertiesApi, - TagValues.ALL_OF: AllOfApi, - TagValues.ANY_OF: AnyOfApi, - TagValues.DEFAULT: DefaultApi, - TagValues.ENUM: EnumApi, - TagValues.FORMAT: FormatApi, - TagValues.ITEMS: ItemsApi, - TagValues.MAXIMUM: MaximumApi, - TagValues.MAX_ITEMS: MaxItemsApi, - TagValues.MAX_LENGTH: MaxLengthApi, - TagValues.MAX_PROPERTIES: MaxPropertiesApi, - TagValues.MINIMUM: MinimumApi, - TagValues.MIN_ITEMS: MinItemsApi, - TagValues.MIN_LENGTH: MinLengthApi, - TagValues.MIN_PROPERTIES: MinPropertiesApi, - TagValues.MULTIPLE_OF: MultipleOfApi, - TagValues.NOT: ModelNotApi, - TagValues.ONE_OF: OneOfApi, - TagValues.PATTERN: PatternApi, - TagValues.PROPERTIES: PropertiesApi, - TagValues.REF: RefApi, - TagValues.REQUIRED: RequiredApi, - TagValues.TYPE: TypeApi, - TagValues.UNIQUE_ITEMS: UniqueItemsApi, - } -) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/__init__.py deleted file mode 100644 index 7a2dacb2e46..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.apis.tag_to_api import tag_to_api - -import enum - - -class TagValues(str, enum.Enum): - OPERATION_REQUEST_BODY = "operation.requestBody" - PATH_POST = "path.post" - CONTENT_TYPE_JSON = "contentType_json" - RESPONSE_CONTENT_CONTENT_TYPE_SCHEMA = "response.content.contentType.schema" - ADDITIONAL_PROPERTIES = "additionalProperties" - ALL_OF = "allOf" - ANY_OF = "anyOf" - DEFAULT = "default" - ENUM = "enum" - FORMAT = "format" - ITEMS = "items" - MAXIMUM = "maximum" - MAX_ITEMS = "maxItems" - MAX_LENGTH = "maxLength" - MAX_PROPERTIES = "maxProperties" - MINIMUM = "minimum" - MIN_ITEMS = "minItems" - MIN_LENGTH = "minLength" - MIN_PROPERTIES = "minProperties" - MULTIPLE_OF = "multipleOf" - NOT = "not" - ONE_OF = "oneOf" - PATTERN = "pattern" - PROPERTIES = "properties" - REF = "$ref" - REQUIRED = "required" - TYPE = "type" - UNIQUE_ITEMS = "uniqueItems" diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/additional_properties_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/additional_properties_api.py deleted file mode 100644 index 764e56412cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/additional_properties_api.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes - - -class AdditionalPropertiesApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/all_of_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/all_of_api.py deleted file mode 100644 index cce0174269e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/all_of_api.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_request_body.post import PostAllofRequestBody -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types.post import PostAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_simple_types_request_body.post import PostAllofSimpleTypesRequestBody -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.post import PostAllofSimpleTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.post import PostAllofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post import PostAllofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.post import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.post import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes - - -class AllOfApi( - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofRequestBody, - PostAllofResponseBodyForContentTypes, - PostAllofSimpleTypesRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/any_of_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/any_of_api.py deleted file mode 100644 index de0242b5aed..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/any_of_api.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body.post import PostAnyofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post import PostAnyofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_request_body.post import PostAnyofRequestBody -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.post import PostAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.post import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.post import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes - - -class AnyOfApi( - PostAnyofComplexTypesRequestBody, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofRequestBody, - PostAnyofResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/content_type_json_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/content_type_json_api.py deleted file mode 100644 index 0e5d3b26c39..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/content_type_json_api.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_request_body.post import PostAllofRequestBody -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types.post import PostAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_simple_types_request_body.post import PostAllofSimpleTypesRequestBody -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.post import PostAllofSimpleTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.post import PostAllofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post import PostAllofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.post import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.post import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body.post import PostAnyofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post import PostAnyofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_request_body.post import PostAnyofRequestBody -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.post import PostAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.post import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.post import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.post import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.post import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_int_request_body.post import PostByIntRequestBody -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.post import PostByIntResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_number_request_body.post import PostByNumberRequestBody -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.post import PostByNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_small_number_request_body.post import PostBySmallNumberRequestBody -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.post import PostBySmallNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_date_time_format_request_body.post import PostDateTimeFormatRequestBody -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.post import PostDateTimeFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_email_format_request_body.post import PostEmailFormatRequestBody -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.post import PostEmailFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.post import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.post import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.post import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.post import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.post import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enums_in_properties_request_body.post import PostEnumsInPropertiesRequestBody -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.post import PostEnumsInPropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post import PostForbiddenPropertyRequestBody -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_hostname_format_request_body.post import PostHostnameFormatRequestBody -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.post import PostHostnameFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.post import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.post import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv4_format_request_body.post import PostIpv4FormatRequestBody -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.post import PostIpv4FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv6_format_request_body.post import PostIpv6FormatRequestBody -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.post import PostIpv6FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_json_pointer_format_request_body.post import PostJsonPointerFormatRequestBody -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.post import PostJsonPointerFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maximum_validation_request_body.post import PostMaximumValidationRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.post import PostMaximumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxitems_validation_request_body.post import PostMaxitemsValidationRequestBody -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.post import PostMaxitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxlength_validation_request_body.post import PostMaxlengthValidationRequestBody -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.post import PostMaxlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body.post import PostMaxpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post import PostMaxpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minimum_validation_request_body.post import PostMinimumValidationRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.post import PostMinimumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minitems_validation_request_body.post import PostMinitemsValidationRequestBody -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.post import PostMinitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minlength_validation_request_body.post import PostMinlengthValidationRequestBody -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.post import PostMinlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minproperties_validation_request_body.post import PostMinpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.post import PostMinpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_items_request_body.post import PostNestedItemsRequestBody -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.post import PostNestedItemsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post import PostNotMoreComplexSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_request_body.post import PostNotRequestBody -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post import PostNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.post import PostNulCharactersInStringsRequestBody -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post import PostNulCharactersInStringsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.post import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_object_properties_validation_request_body.post import PostObjectPropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.post import PostObjectPropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.post import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import PostOneofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post import PostOneofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_request_body.post import PostOneofRequestBody -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import PostOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import PostOneofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import PostPatternValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.post import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_allof_request_body.post import PostRefInAllofRequestBody -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.post import PostRefInAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body.post import PostRefInAnyofRequestBody -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post import PostRefInAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_items_request_body.post import PostRefInItemsRequestBody -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.post import PostRefInItemsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_not_request_body.post import PostRefInNotRequestBody -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.post import PostRefInNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body.post import PostRefInOneofRequestBody -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post import PostRefInOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_property_request_body.post import PostRefInPropertyRequestBody -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.post import PostRefInPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import PostRequiredDefaultValidationRequestBody -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import PostRequiredDefaultValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_validation_request_body.post import PostRequiredValidationRequestBody -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import PostStringTypeMatchesStringsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from 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 import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.post import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.post import PostUniqueitemsValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post import PostUniqueitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_format_request_body.post import PostUriFormatRequestBody -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.post import PostUriFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_reference_format_request_body.post import PostUriReferenceFormatRequestBody -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.post import PostUriReferenceFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_template_format_request_body.post import PostUriTemplateFormatRequestBody -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.post import PostUriTemplateFormatResponseBodyForContentTypes - - -class ContentTypeJsonApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofRequestBody, - PostAllofResponseBodyForContentTypes, - PostAllofSimpleTypesRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostAnyofComplexTypesRequestBody, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofRequestBody, - PostAnyofResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostArrayTypeMatchesArraysRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostByIntRequestBody, - PostByIntResponseBodyForContentTypes, - PostByNumberRequestBody, - PostByNumberResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostBySmallNumberResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumsInPropertiesRequestBody, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostInvalidStringValueForDefaultRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostIpv6FormatResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostMaxitemsValidationResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostMinimumValidationRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostMinitemsValidationRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, - PostMinlengthValidationResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedItemsRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNulCharactersInStringsRequestBody, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostObjectPropertiesValidationRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsRequestBody, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostOneofComplexTypesResponseBodyForContentTypes, - PostOneofRequestBody, - PostOneofResponseBodyForContentTypes, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostPatternIsNotAnchoredRequestBody, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationRequestBody, - PostPatternValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRefInAllofRequestBody, - PostRefInAllofResponseBodyForContentTypes, - PostRefInAnyofRequestBody, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostRefInItemsResponseBodyForContentTypes, - PostRefInNotRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostRefInOneofRequestBody, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostRefInPropertyResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationRequestBody, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostStringTypeMatchesStringsRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostUniqueitemsValidationRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostUriFormatResponseBodyForContentTypes, - PostUriReferenceFormatRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostUriTemplateFormatResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/default_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/default_api.py deleted file mode 100644 index 63ec1b87fe7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/default_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.post import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from 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 import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes - - -class DefaultApi( - PostInvalidStringValueForDefaultRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/enum_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/enum_api.py deleted file mode 100644 index a5fe3006617..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/enum_api.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.post import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.post import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.post import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.post import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.post import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enums_in_properties_request_body.post import PostEnumsInPropertiesRequestBody -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.post import PostEnumsInPropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.post import PostNulCharactersInStringsRequestBody -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post import PostNulCharactersInStringsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes - - -class EnumApi( - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumsInPropertiesRequestBody, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostNulCharactersInStringsRequestBody, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostSimpleEnumValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/format_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/format_api.py deleted file mode 100644 index 2741a9bac77..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/format_api.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_date_time_format_request_body.post import PostDateTimeFormatRequestBody -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.post import PostDateTimeFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_email_format_request_body.post import PostEmailFormatRequestBody -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.post import PostEmailFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_hostname_format_request_body.post import PostHostnameFormatRequestBody -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.post import PostHostnameFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv4_format_request_body.post import PostIpv4FormatRequestBody -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.post import PostIpv4FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv6_format_request_body.post import PostIpv6FormatRequestBody -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.post import PostIpv6FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_json_pointer_format_request_body.post import PostJsonPointerFormatRequestBody -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.post import PostJsonPointerFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_format_request_body.post import PostUriFormatRequestBody -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.post import PostUriFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_reference_format_request_body.post import PostUriReferenceFormatRequestBody -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.post import PostUriReferenceFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_template_format_request_body.post import PostUriTemplateFormatRequestBody -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.post import PostUriTemplateFormatResponseBodyForContentTypes - - -class FormatApi( - PostDateTimeFormatRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostEmailFormatResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostIpv6FormatResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostUriFormatResponseBodyForContentTypes, - PostUriReferenceFormatRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostUriTemplateFormatResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/items_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/items_api.py deleted file mode 100644 index edfe56e91f9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/items_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_nested_items_request_body.post import PostNestedItemsRequestBody -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.post import PostNestedItemsResponseBodyForContentTypes - - -class ItemsApi( - PostNestedItemsRequestBody, - PostNestedItemsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_items_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_items_api.py deleted file mode 100644 index 4d06489252c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_items_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_maxitems_validation_request_body.post import PostMaxitemsValidationRequestBody -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.post import PostMaxitemsValidationResponseBodyForContentTypes - - -class MaxItemsApi( - PostMaxitemsValidationRequestBody, - PostMaxitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_length_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_length_api.py deleted file mode 100644 index 693a1ef965b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_length_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_maxlength_validation_request_body.post import PostMaxlengthValidationRequestBody -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.post import PostMaxlengthValidationResponseBodyForContentTypes - - -class MaxLengthApi( - PostMaxlengthValidationRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_properties_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_properties_api.py deleted file mode 100644 index 56c90ed28c0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/max_properties_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body.post import PostMaxpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post import PostMaxpropertiesValidationResponseBodyForContentTypes - - -class MaxPropertiesApi( - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/maximum_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/maximum_api.py deleted file mode 100644 index 017bc30650a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/maximum_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_maximum_validation_request_body.post import PostMaximumValidationRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.post import PostMaximumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes - - -class MaximumApi( - PostMaximumValidationRequestBody, - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_items_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_items_api.py deleted file mode 100644 index 93f1ae37b0c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_items_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_minitems_validation_request_body.post import PostMinitemsValidationRequestBody -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.post import PostMinitemsValidationResponseBodyForContentTypes - - -class MinItemsApi( - PostMinitemsValidationRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_length_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_length_api.py deleted file mode 100644 index 60429b6e3c6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_length_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_minlength_validation_request_body.post import PostMinlengthValidationRequestBody -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.post import PostMinlengthValidationResponseBodyForContentTypes - - -class MinLengthApi( - PostMinlengthValidationRequestBody, - PostMinlengthValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_properties_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_properties_api.py deleted file mode 100644 index d51d44f4b81..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/min_properties_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_minproperties_validation_request_body.post import PostMinpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.post import PostMinpropertiesValidationResponseBodyForContentTypes - - -class MinPropertiesApi( - PostMinpropertiesValidationRequestBody, - PostMinpropertiesValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/minimum_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/minimum_api.py deleted file mode 100644 index f7e4c9ac0ee..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/minimum_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_minimum_validation_request_body.post import PostMinimumValidationRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.post import PostMinimumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes - - -class MinimumApi( - PostMinimumValidationRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/model_not_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/model_not_api.py deleted file mode 100644 index ae8de1451fc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/model_not_api.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post import PostForbiddenPropertyRequestBody -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post import PostNotMoreComplexSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_request_body.post import PostNotRequestBody -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post import PostNotResponseBodyForContentTypes - - -class ModelNotApi( - PostForbiddenPropertyRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostNotRequestBody, - PostNotResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/multiple_of_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/multiple_of_api.py deleted file mode 100644 index f694870392c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/multiple_of_api.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_by_int_request_body.post import PostByIntRequestBody -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.post import PostByIntResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_number_request_body.post import PostByNumberRequestBody -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.post import PostByNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_small_number_request_body.post import PostBySmallNumberRequestBody -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.post import PostBySmallNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes - - -class MultipleOfApi( - PostByIntRequestBody, - PostByIntResponseBodyForContentTypes, - PostByNumberRequestBody, - PostByNumberResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostBySmallNumberResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/one_of_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/one_of_api.py deleted file mode 100644 index 4582b5e30f4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/one_of_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import PostOneofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post import PostOneofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_request_body.post import PostOneofRequestBody -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import PostOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import PostOneofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes - - -class OneOfApi( - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostOneofComplexTypesResponseBodyForContentTypes, - PostOneofRequestBody, - PostOneofResponseBodyForContentTypes, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/operation_request_body_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/operation_request_body_api.py deleted file mode 100644 index 2f64723d300..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/operation_request_body_api.py +++ /dev/null @@ -1,195 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.paths.request_body_post_allof_request_body.post import PostAllofRequestBody -from unit_test_api.paths.request_body_post_allof_simple_types_request_body.post import PostAllofSimpleTypesRequestBody -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.post import PostAllofWithBaseSchemaRequestBody -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.post import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.post import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body.post import PostAnyofComplexTypesRequestBody -from unit_test_api.paths.request_body_post_anyof_request_body.post import PostAnyofRequestBody -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.post import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.post import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.post import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.post import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.paths.request_body_post_by_int_request_body.post import PostByIntRequestBody -from unit_test_api.paths.request_body_post_by_number_request_body.post import PostByNumberRequestBody -from unit_test_api.paths.request_body_post_by_small_number_request_body.post import PostBySmallNumberRequestBody -from unit_test_api.paths.request_body_post_date_time_format_request_body.post import PostDateTimeFormatRequestBody -from unit_test_api.paths.request_body_post_email_format_request_body.post import PostEmailFormatRequestBody -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.post import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.post import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.post import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.post import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.post import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.paths.request_body_post_enums_in_properties_request_body.post import PostEnumsInPropertiesRequestBody -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post import PostForbiddenPropertyRequestBody -from unit_test_api.paths.request_body_post_hostname_format_request_body.post import PostHostnameFormatRequestBody -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.post import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.post import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.paths.request_body_post_ipv4_format_request_body.post import PostIpv4FormatRequestBody -from unit_test_api.paths.request_body_post_ipv6_format_request_body.post import PostIpv6FormatRequestBody -from unit_test_api.paths.request_body_post_json_pointer_format_request_body.post import PostJsonPointerFormatRequestBody -from unit_test_api.paths.request_body_post_maximum_validation_request_body.post import PostMaximumValidationRequestBody -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.paths.request_body_post_maxitems_validation_request_body.post import PostMaxitemsValidationRequestBody -from unit_test_api.paths.request_body_post_maxlength_validation_request_body.post import PostMaxlengthValidationRequestBody -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body.post import PostMaxpropertiesValidationRequestBody -from unit_test_api.paths.request_body_post_minimum_validation_request_body.post import PostMinimumValidationRequestBody -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.paths.request_body_post_minitems_validation_request_body.post import PostMinitemsValidationRequestBody -from unit_test_api.paths.request_body_post_minlength_validation_request_body.post import PostMinlengthValidationRequestBody -from unit_test_api.paths.request_body_post_minproperties_validation_request_body.post import PostMinpropertiesValidationRequestBody -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.request_body_post_nested_items_request_body.post import PostNestedItemsRequestBody -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.request_body_post_not_request_body.post import PostNotRequestBody -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.post import PostNulCharactersInStringsRequestBody -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.post import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.paths.request_body_post_object_properties_validation_request_body.post import PostObjectPropertiesValidationRequestBody -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.post import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import PostOneofComplexTypesRequestBody -from unit_test_api.paths.request_body_post_oneof_request_body.post import PostOneofRequestBody -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import PostOneofWithBaseSchemaRequestBody -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody -from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody -from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.post import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.paths.request_body_post_ref_in_allof_request_body.post import PostRefInAllofRequestBody -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body.post import PostRefInAnyofRequestBody -from unit_test_api.paths.request_body_post_ref_in_items_request_body.post import PostRefInItemsRequestBody -from unit_test_api.paths.request_body_post_ref_in_not_request_body.post import PostRefInNotRequestBody -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body.post import PostRefInOneofRequestBody -from unit_test_api.paths.request_body_post_ref_in_property_request_body.post import PostRefInPropertyRequestBody -from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import PostRequiredDefaultValidationRequestBody -from unit_test_api.paths.request_body_post_required_validation_request_body.post import PostRequiredValidationRequestBody -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.post import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.post import PostUniqueitemsValidationRequestBody -from unit_test_api.paths.request_body_post_uri_format_request_body.post import PostUriFormatRequestBody -from unit_test_api.paths.request_body_post_uri_reference_format_request_body.post import PostUriReferenceFormatRequestBody -from unit_test_api.paths.request_body_post_uri_template_format_request_body.post import PostUriTemplateFormatRequestBody - - -class OperationRequestBodyApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofRequestBody, - PostAllofSimpleTypesRequestBody, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTwoEmptySchemasRequestBody, - PostAnyofComplexTypesRequestBody, - PostAnyofRequestBody, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithOneEmptySchemaRequestBody, - PostArrayTypeMatchesArraysRequestBody, - PostBooleanTypeMatchesBooleansRequestBody, - PostByIntRequestBody, - PostByNumberRequestBody, - PostBySmallNumberRequestBody, - PostDateTimeFormatRequestBody, - PostEmailFormatRequestBody, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumsInPropertiesRequestBody, - PostForbiddenPropertyRequestBody, - PostHostnameFormatRequestBody, - PostIntegerTypeMatchesIntegersRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidStringValueForDefaultRequestBody, - PostIpv4FormatRequestBody, - PostIpv6FormatRequestBody, - PostJsonPointerFormatRequestBody, - PostMaximumValidationRequestBody, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaxitemsValidationRequestBody, - PostMaxlengthValidationRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxpropertiesValidationRequestBody, - PostMinimumValidationRequestBody, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinitemsValidationRequestBody, - PostMinlengthValidationRequestBody, - PostMinpropertiesValidationRequestBody, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedItemsRequestBody, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNotMoreComplexSchemaRequestBody, - PostNotRequestBody, - PostNulCharactersInStringsRequestBody, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNumberTypeMatchesNumbersRequestBody, - PostObjectPropertiesValidationRequestBody, - PostObjectTypeMatchesObjectsRequestBody, - PostOneofComplexTypesRequestBody, - PostOneofRequestBody, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithEmptySchemaRequestBody, - PostOneofWithRequiredRequestBody, - PostPatternIsNotAnchoredRequestBody, - PostPatternValidationRequestBody, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAllofRequestBody, - PostRefInAnyofRequestBody, - PostRefInItemsRequestBody, - PostRefInNotRequestBody, - PostRefInOneofRequestBody, - PostRefInPropertyRequestBody, - PostRequiredDefaultValidationRequestBody, - PostRequiredValidationRequestBody, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredWithEscapedCharactersRequestBody, - PostSimpleEnumValidationRequestBody, - PostStringTypeMatchesStringsRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsValidationRequestBody, - PostUriFormatRequestBody, - PostUriReferenceFormatRequestBody, - PostUriTemplateFormatRequestBody, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/path_post_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/path_post_api.py deleted file mode 100644 index 3003735504e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/path_post_api.py +++ /dev/null @@ -1,369 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body.post import PostAdditionalpropertiesAreAllowedByDefaultRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body.post import PostAdditionalpropertiesCanExistByItselfRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body.post import PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body.post import PostAllofCombinedWithAnyofOneofRequestBody -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_request_body.post import PostAllofRequestBody -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types.post import PostAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_simple_types_request_body.post import PostAllofSimpleTypesRequestBody -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.post import PostAllofSimpleTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body.post import PostAllofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post import PostAllofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body.post import PostAllofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body.post import PostAllofWithTheFirstEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body.post import PostAllofWithTheLastEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body.post import PostAllofWithTwoEmptySchemasRequestBody -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_complex_types_request_body.post import PostAnyofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post import PostAnyofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_request_body.post import PostAnyofRequestBody -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.post import PostAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body.post import PostAnyofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body.post import PostAnyofWithOneEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.post import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.post import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_int_request_body.post import PostByIntRequestBody -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.post import PostByIntResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_number_request_body.post import PostByNumberRequestBody -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.post import PostByNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_by_small_number_request_body.post import PostBySmallNumberRequestBody -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.post import PostBySmallNumberResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_date_time_format_request_body.post import PostDateTimeFormatRequestBody -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.post import PostDateTimeFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_email_format_request_body.post import PostEmailFormatRequestBody -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.post import PostEmailFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body.post import PostEnumWith0DoesNotMatchFalseRequestBody -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body.post import PostEnumWith1DoesNotMatchTrueRequestBody -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body.post import PostEnumWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body.post import PostEnumWithFalseDoesNotMatch0RequestBody -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body.post import PostEnumWithTrueDoesNotMatch1RequestBody -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_enums_in_properties_request_body.post import PostEnumsInPropertiesRequestBody -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.post import PostEnumsInPropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_forbidden_property_request_body.post import PostForbiddenPropertyRequestBody -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_hostname_format_request_body.post import PostHostnameFormatRequestBody -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.post import PostHostnameFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.post import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body.post import PostInvalidStringValueForDefaultRequestBody -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv4_format_request_body.post import PostIpv4FormatRequestBody -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.post import PostIpv4FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ipv6_format_request_body.post import PostIpv6FormatRequestBody -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.post import PostIpv6FormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_json_pointer_format_request_body.post import PostJsonPointerFormatRequestBody -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.post import PostJsonPointerFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maximum_validation_request_body.post import PostMaximumValidationRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.post import PostMaximumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body.post import PostMaximumValidationWithUnsignedIntegerRequestBody -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxitems_validation_request_body.post import PostMaxitemsValidationRequestBody -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.post import PostMaxitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxlength_validation_request_body.post import PostMaxlengthValidationRequestBody -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.post import PostMaxlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body.post import PostMaxproperties0MeansTheObjectIsEmptyRequestBody -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_maxproperties_validation_request_body.post import PostMaxpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post import PostMaxpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minimum_validation_request_body.post import PostMinimumValidationRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.post import PostMinimumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body.post import PostMinimumValidationWithSignedIntegerRequestBody -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minitems_validation_request_body.post import PostMinitemsValidationRequestBody -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.post import PostMinitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minlength_validation_request_body.post import PostMinlengthValidationRequestBody -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.post import PostMinlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_minproperties_validation_request_body.post import PostMinpropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.post import PostMinpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body.post import PostNestedAllofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body.post import PostNestedAnyofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_items_request_body.post import PostNestedItemsRequestBody -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.post import PostNestedItemsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body.post import PostNestedOneofToCheckValidationSemanticsRequestBody -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body.post import PostNotMoreComplexSchemaRequestBody -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post import PostNotMoreComplexSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_not_request_body.post import PostNotRequestBody -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post import PostNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body.post import PostNulCharactersInStringsRequestBody -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post import PostNulCharactersInStringsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.post import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_object_properties_validation_request_body.post import PostObjectPropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.post import PostObjectPropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.post import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_complex_types_request_body.post import PostOneofComplexTypesRequestBody -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post import PostOneofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_request_body.post import PostOneofRequestBody -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import PostOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body.post import PostOneofWithBaseSchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body.post import PostOneofWithEmptySchemaRequestBody -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_oneof_with_required_request_body.post import PostOneofWithRequiredRequestBody -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import PostPatternValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.post import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_allof_request_body.post import PostRefInAllofRequestBody -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.post import PostRefInAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body.post import PostRefInAnyofRequestBody -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post import PostRefInAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_items_request_body.post import PostRefInItemsRequestBody -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.post import PostRefInItemsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_not_request_body.post import PostRefInNotRequestBody -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.post import PostRefInNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body.post import PostRefInOneofRequestBody -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post import PostRefInOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_property_request_body.post import PostRefInPropertyRequestBody -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.post import PostRefInPropertyResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import PostRequiredDefaultValidationRequestBody -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import PostRequiredDefaultValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_validation_request_body.post import PostRequiredValidationRequestBody -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_simple_enum_validation_request_body.post import PostSimpleEnumValidationRequestBody -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import PostStringTypeMatchesStringsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body.post import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody -from 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 import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.post import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.post import PostUniqueitemsValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post import PostUniqueitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_format_request_body.post import PostUriFormatRequestBody -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.post import PostUriFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_reference_format_request_body.post import PostUriReferenceFormatRequestBody -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.post import PostUriReferenceFormatResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uri_template_format_request_body.post import PostUriTemplateFormatRequestBody -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.post import PostUriTemplateFormatResponseBodyForContentTypes - - -class PathPostApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody, - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultRequestBody, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfRequestBody, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofRequestBody, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofRequestBody, - PostAllofResponseBodyForContentTypes, - PostAllofSimpleTypesRequestBody, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithBaseSchemaRequestBody, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaRequestBody, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaRequestBody, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaRequestBody, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasRequestBody, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostAnyofComplexTypesRequestBody, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofRequestBody, - PostAnyofResponseBodyForContentTypes, - PostAnyofWithBaseSchemaRequestBody, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaRequestBody, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostArrayTypeMatchesArraysRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostByIntRequestBody, - PostByIntResponseBodyForContentTypes, - PostByNumberRequestBody, - PostByNumberResponseBodyForContentTypes, - PostBySmallNumberRequestBody, - PostBySmallNumberResponseBodyForContentTypes, - PostDateTimeFormatRequestBody, - PostDateTimeFormatResponseBodyForContentTypes, - PostEmailFormatRequestBody, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseRequestBody, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueRequestBody, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithEscapedCharactersRequestBody, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0RequestBody, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1RequestBody, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumsInPropertiesRequestBody, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostForbiddenPropertyRequestBody, - PostForbiddenPropertyResponseBodyForContentTypes, - PostHostnameFormatRequestBody, - PostHostnameFormatResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostInvalidStringValueForDefaultRequestBody, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostIpv4FormatRequestBody, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatRequestBody, - PostIpv6FormatResponseBodyForContentTypes, - PostJsonPointerFormatRequestBody, - PostJsonPointerFormatResponseBodyForContentTypes, - PostMaximumValidationRequestBody, - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerRequestBody, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostMaxitemsValidationRequestBody, - PostMaxitemsValidationResponseBodyForContentTypes, - PostMaxlengthValidationRequestBody, - PostMaxlengthValidationResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyRequestBody, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationRequestBody, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostMinimumValidationRequestBody, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerRequestBody, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostMinitemsValidationRequestBody, - PostMinitemsValidationResponseBodyForContentTypes, - PostMinlengthValidationRequestBody, - PostMinlengthValidationResponseBodyForContentTypes, - PostMinpropertiesValidationRequestBody, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsRequestBody, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsRequestBody, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedItemsRequestBody, - PostNestedItemsResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsRequestBody, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNotMoreComplexSchemaRequestBody, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostNotRequestBody, - PostNotResponseBodyForContentTypes, - PostNulCharactersInStringsRequestBody, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostObjectPropertiesValidationRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsRequestBody, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostOneofComplexTypesRequestBody, - PostOneofComplexTypesResponseBodyForContentTypes, - PostOneofRequestBody, - PostOneofResponseBodyForContentTypes, - PostOneofWithBaseSchemaRequestBody, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaRequestBody, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithRequiredRequestBody, - PostOneofWithRequiredResponseBodyForContentTypes, - PostPatternIsNotAnchoredRequestBody, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationRequestBody, - PostPatternValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRefInAllofRequestBody, - PostRefInAllofResponseBodyForContentTypes, - PostRefInAnyofRequestBody, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostRefInItemsResponseBodyForContentTypes, - PostRefInNotRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostRefInOneofRequestBody, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostRefInPropertyResponseBodyForContentTypes, - PostRequiredDefaultValidationRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationRequestBody, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationRequestBody, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostStringTypeMatchesStringsRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostUniqueitemsValidationRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostUriFormatRequestBody, - PostUriFormatResponseBodyForContentTypes, - PostUriReferenceFormatRequestBody, - PostUriReferenceFormatResponseBodyForContentTypes, - PostUriTemplateFormatRequestBody, - PostUriTemplateFormatResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/pattern_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/pattern_api.py deleted file mode 100644 index 0e1e1dad2cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/pattern_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body.post import PostPatternIsNotAnchoredRequestBody -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_pattern_validation_request_body.post import PostPatternValidationRequestBody -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import PostPatternValidationResponseBodyForContentTypes - - -class PatternApi( - PostPatternIsNotAnchoredRequestBody, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationRequestBody, - PostPatternValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/properties_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/properties_api.py deleted file mode 100644 index 3514d135759..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/properties_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_object_properties_validation_request_body.post import PostObjectPropertiesValidationRequestBody -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.post import PostObjectPropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body.post import PostPropertiesWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes - - -class PropertiesApi( - PostObjectPropertiesValidationRequestBody, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersRequestBody, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/ref_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/ref_api.py deleted file mode 100644 index 7775cd1104f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/ref_api.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body.post import PostPropertyNamedRefThatIsNotAReferenceRequestBody -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body.post import PostRefInAdditionalpropertiesRequestBody -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_allof_request_body.post import PostRefInAllofRequestBody -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.post import PostRefInAllofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_anyof_request_body.post import PostRefInAnyofRequestBody -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post import PostRefInAnyofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_items_request_body.post import PostRefInItemsRequestBody -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.post import PostRefInItemsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_not_request_body.post import PostRefInNotRequestBody -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.post import PostRefInNotResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_oneof_request_body.post import PostRefInOneofRequestBody -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post import PostRefInOneofResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_ref_in_property_request_body.post import PostRefInPropertyRequestBody -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.post import PostRefInPropertyResponseBodyForContentTypes - - -class RefApi( - PostPropertyNamedRefThatIsNotAReferenceRequestBody, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRefInAdditionalpropertiesRequestBody, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRefInAllofRequestBody, - PostRefInAllofResponseBodyForContentTypes, - PostRefInAnyofRequestBody, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsRequestBody, - PostRefInItemsResponseBodyForContentTypes, - PostRefInNotRequestBody, - PostRefInNotResponseBodyForContentTypes, - PostRefInOneofRequestBody, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyRequestBody, - PostRefInPropertyResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/required_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/required_api.py deleted file mode 100644 index 4ba23de087a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/required_api.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_required_default_validation_request_body.post import PostRequiredDefaultValidationRequestBody -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import PostRequiredDefaultValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_validation_request_body.post import PostRequiredValidationRequestBody -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_empty_array_request_body.post import PostRequiredWithEmptyArrayRequestBody -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body.post import PostRequiredWithEscapedCharactersRequestBody -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes - - -class RequiredApi( - PostRequiredDefaultValidationRequestBody, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationRequestBody, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayRequestBody, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersRequestBody, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/response_content_content_type_schema_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/response_content_content_type_schema_api.py deleted file mode 100644 index 0e0e47d3f8a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/response_content_content_type_schema_api.py +++ /dev/null @@ -1,195 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types.post import PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types.post import PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types.post import PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types.post import PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types.post import PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_response_body_for_content_types.post import PostAllofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types.post import PostAllofSimpleTypesResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types.post import PostAllofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types.post import PostAllofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types.post import PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types.post import PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types.post import PostAllofWithTwoEmptySchemasResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types.post import PostAnyofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types.post import PostAnyofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types.post import PostAnyofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types.post import PostAnyofWithOneEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types.post import PostByIntResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types.post import PostByNumberResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types.post import PostBySmallNumberResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types.post import PostDateTimeFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types.post import PostEmailFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types.post import PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types.post import PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types.post import PostEnumWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types.post import PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types.post import PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types.post import PostEnumsInPropertiesResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types.post import PostForbiddenPropertyResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types.post import PostHostnameFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types.post import PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types.post import PostInvalidStringValueForDefaultResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types.post import PostIpv4FormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types.post import PostIpv6FormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types.post import PostJsonPointerFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types.post import PostMaximumValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types.post import PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types.post import PostMaxitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types.post import PostMaxlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types.post import PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types.post import PostMaxpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types.post import PostMinimumValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types.post import PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types.post import PostMinitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types.post import PostMinlengthValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types.post import PostMinpropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types.post import PostNestedItemsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types.post import PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types.post import PostNotMoreComplexSchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_not_response_body_for_content_types.post import PostNotResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types.post import PostNulCharactersInStringsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types.post import PostObjectPropertiesValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types.post import PostOneofComplexTypesResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types.post import PostOneofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types.post import PostOneofWithBaseSchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types.post import PostOneofWithEmptySchemaResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types.post import PostOneofWithRequiredResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types.post import PostPatternIsNotAnchoredResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types.post import PostPatternValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types.post import PostPropertiesWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types.post import PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types.post import PostRefInAdditionalpropertiesResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types.post import PostRefInAllofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types.post import PostRefInAnyofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types.post import PostRefInItemsResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types.post import PostRefInNotResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types.post import PostRefInOneofResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types.post import PostRefInPropertyResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types.post import PostRequiredDefaultValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types.post import PostRequiredValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types.post import PostRequiredWithEmptyArrayResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types.post import PostRequiredWithEscapedCharactersResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types.post import PostSimpleEnumValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import PostStringTypeMatchesStringsResponseBodyForContentTypes -from 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 import PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post import PostUniqueitemsValidationResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types.post import PostUriFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types.post import PostUriReferenceFormatResponseBodyForContentTypes -from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types.post import PostUriTemplateFormatResponseBodyForContentTypes - - -class ResponseContentContentTypeSchemaApi( - PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes, - PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes, - PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes, - PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes, - PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes, - PostAllofResponseBodyForContentTypes, - PostAllofSimpleTypesResponseBodyForContentTypes, - PostAllofWithBaseSchemaResponseBodyForContentTypes, - PostAllofWithOneEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes, - PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes, - PostAllofWithTwoEmptySchemasResponseBodyForContentTypes, - PostAnyofComplexTypesResponseBodyForContentTypes, - PostAnyofResponseBodyForContentTypes, - PostAnyofWithBaseSchemaResponseBodyForContentTypes, - PostAnyofWithOneEmptySchemaResponseBodyForContentTypes, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostByIntResponseBodyForContentTypes, - PostByNumberResponseBodyForContentTypes, - PostBySmallNumberResponseBodyForContentTypes, - PostDateTimeFormatResponseBodyForContentTypes, - PostEmailFormatResponseBodyForContentTypes, - PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes, - PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes, - PostEnumWithEscapedCharactersResponseBodyForContentTypes, - PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes, - PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes, - PostEnumsInPropertiesResponseBodyForContentTypes, - PostForbiddenPropertyResponseBodyForContentTypes, - PostHostnameFormatResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes, - PostInvalidStringValueForDefaultResponseBodyForContentTypes, - PostIpv4FormatResponseBodyForContentTypes, - PostIpv6FormatResponseBodyForContentTypes, - PostJsonPointerFormatResponseBodyForContentTypes, - PostMaximumValidationResponseBodyForContentTypes, - PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes, - PostMaxitemsValidationResponseBodyForContentTypes, - PostMaxlengthValidationResponseBodyForContentTypes, - PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes, - PostMaxpropertiesValidationResponseBodyForContentTypes, - PostMinimumValidationResponseBodyForContentTypes, - PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes, - PostMinitemsValidationResponseBodyForContentTypes, - PostMinlengthValidationResponseBodyForContentTypes, - PostMinpropertiesValidationResponseBodyForContentTypes, - PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNestedItemsResponseBodyForContentTypes, - PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes, - PostNotMoreComplexSchemaResponseBodyForContentTypes, - PostNotResponseBodyForContentTypes, - PostNulCharactersInStringsResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostObjectPropertiesValidationResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostOneofComplexTypesResponseBodyForContentTypes, - PostOneofResponseBodyForContentTypes, - PostOneofWithBaseSchemaResponseBodyForContentTypes, - PostOneofWithEmptySchemaResponseBodyForContentTypes, - PostOneofWithRequiredResponseBodyForContentTypes, - PostPatternIsNotAnchoredResponseBodyForContentTypes, - PostPatternValidationResponseBodyForContentTypes, - PostPropertiesWithEscapedCharactersResponseBodyForContentTypes, - PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes, - PostRefInAdditionalpropertiesResponseBodyForContentTypes, - PostRefInAllofResponseBodyForContentTypes, - PostRefInAnyofResponseBodyForContentTypes, - PostRefInItemsResponseBodyForContentTypes, - PostRefInNotResponseBodyForContentTypes, - PostRefInOneofResponseBodyForContentTypes, - PostRefInPropertyResponseBodyForContentTypes, - PostRequiredDefaultValidationResponseBodyForContentTypes, - PostRequiredValidationResponseBodyForContentTypes, - PostRequiredWithEmptyArrayResponseBodyForContentTypes, - PostRequiredWithEscapedCharactersResponseBodyForContentTypes, - PostSimpleEnumValidationResponseBodyForContentTypes, - PostStringTypeMatchesStringsResponseBodyForContentTypes, - PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostUniqueitemsValidationResponseBodyForContentTypes, - PostUriFormatResponseBodyForContentTypes, - PostUriReferenceFormatResponseBodyForContentTypes, - PostUriTemplateFormatResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/type_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/type_api.py deleted file mode 100644 index dbb518c1c00..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/type_api.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body.post import PostArrayTypeMatchesArraysRequestBody -from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types.post import PostArrayTypeMatchesArraysResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body.post import PostBooleanTypeMatchesBooleansRequestBody -from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types.post import PostBooleanTypeMatchesBooleansResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body.post import PostIntegerTypeMatchesIntegersRequestBody -from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types.post import PostIntegerTypeMatchesIntegersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body.post import PostNullTypeMatchesOnlyTheNullObjectRequestBody -from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types.post import PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body.post import PostNumberTypeMatchesNumbersRequestBody -from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types.post import PostNumberTypeMatchesNumbersResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body.post import PostObjectTypeMatchesObjectsRequestBody -from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types.post import PostObjectTypeMatchesObjectsResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body.post import PostStringTypeMatchesStringsRequestBody -from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types.post import PostStringTypeMatchesStringsResponseBodyForContentTypes - - -class TypeApi( - PostArrayTypeMatchesArraysRequestBody, - PostArrayTypeMatchesArraysResponseBodyForContentTypes, - PostBooleanTypeMatchesBooleansRequestBody, - PostBooleanTypeMatchesBooleansResponseBodyForContentTypes, - PostIntegerTypeMatchesIntegersRequestBody, - PostIntegerTypeMatchesIntegersResponseBodyForContentTypes, - PostNullTypeMatchesOnlyTheNullObjectRequestBody, - PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes, - PostNumberTypeMatchesNumbersRequestBody, - PostNumberTypeMatchesNumbersResponseBodyForContentTypes, - PostObjectTypeMatchesObjectsRequestBody, - PostObjectTypeMatchesObjectsResponseBodyForContentTypes, - PostStringTypeMatchesStringsRequestBody, - PostStringTypeMatchesStringsResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/unique_items_api.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/unique_items_api.py deleted file mode 100644 index 820896d2894..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/apis/tags/unique_items_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body.post import PostUniqueitemsFalseValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types.post import PostUniqueitemsFalseValidationResponseBodyForContentTypes -from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body.post import PostUniqueitemsValidationRequestBody -from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types.post import PostUniqueitemsValidationResponseBodyForContentTypes - - -class UniqueItemsApi( - PostUniqueitemsFalseValidationRequestBody, - PostUniqueitemsFalseValidationResponseBodyForContentTypes, - PostUniqueitemsValidationRequestBody, - PostUniqueitemsValidationResponseBodyForContentTypes, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py deleted file mode 100644 index 52c052110ec..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/configuration.py +++ /dev/null @@ -1,426 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -from http import client as http_client -from unit_test_api.exceptions import ApiValueError - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - """ - - _default = None - - def __init__( - self, - host=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ): - """Constructor - """ - self._base_path = "https://someserver.com/v1" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.disabled_client_side_validations = disabled_client_side_validations - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("unit_test_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.0.1\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://someserver.com/v1", - 'description': "No description provided", - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py deleted file mode 100644 index 983bba8a4c4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/exceptions.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" -import dataclasses -import typing - -from urllib3._collections import HTTPHeaderDict - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -T = typing.TypeVar("T") - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: str - api_response: typing.Optional[T] = None - - @property - def body(self) -> typing.Union[str, bytes, None]: - if not self.api_response: - return None - return self.api_response.response.data - - @property - def headers(self) -> typing.Optional[HTTPHeaderDict]: - if not self.api_response: - return None - return self.api_response.response.getheaders() - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/__init__.py deleted file mode 100644 index 0056d7a31eb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from unit_test_api.models import ModelA, ModelB diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py deleted file mode 100644 index 9e581b19d8f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesAllowsASchemaWhichShouldValidate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - additional_properties = schemas.BoolSchema - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi deleted file mode 100644 index 9e581b19d8f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_allows_a_schema_which_should_validate.pyi +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesAllowsASchemaWhichShouldValidate( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - additional_properties = schemas.BoolSchema - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo"], typing_extensions.Literal["bar"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesAllowsASchemaWhichShouldValidate': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py deleted file mode 100644 index 67bcff89af4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesAreAllowedByDefault( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalpropertiesAreAllowedByDefault': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi deleted file mode 100644 index 67bcff89af4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_are_allowed_by_default.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesAreAllowedByDefault( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalpropertiesAreAllowedByDefault': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py deleted file mode 100644 index 9d86ab6eeaa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesCanExistByItself( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesCanExistByItself': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi deleted file mode 100644 index 9d86ab6eeaa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_can_exist_by_itself.pyi +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesCanExistByItself( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesCanExistByItself': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py deleted file mode 100644 index 629a345a675..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesShouldNotLookInApplicators( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesShouldNotLookInApplicators': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi deleted file mode 100644 index 629a345a675..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/additionalproperties_should_not_look_in_applicators.pyi +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AdditionalpropertiesShouldNotLookInApplicators( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'AdditionalpropertiesShouldNotLookInApplicators': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py deleted file mode 100644 index 2c672855e2d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Allof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Allof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi deleted file mode 100644 index 2c672855e2d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof.pyi +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Allof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Allof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py deleted file mode 100644 index 2ff1d34cf09..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.py +++ /dev/null @@ -1,161 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofCombinedWithAnyofOneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - multiple_of = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - multiple_of = 5 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - multiple_of = 3 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofCombinedWithAnyofOneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi deleted file mode 100644 index b9afb0232d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_combined_with_anyof_oneof.pyi +++ /dev/null @@ -1,158 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofCombinedWithAnyofOneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofCombinedWithAnyofOneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py deleted file mode 100644 index 5ede861b17c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofSimpleTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - inclusive_maximum = 30 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - inclusive_minimum = 20 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofSimpleTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi deleted file mode 100644 index 709f7579168..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_simple_types.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofSimpleTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofSimpleTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py deleted file mode 100644 index a2d8ed50db0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.py +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithBaseSchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "baz", - } - - class properties: - baz = schemas.NoneSchema - __annotations__ = { - "baz": baz, - } - - - baz: MetaOapg.properties.baz - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["baz", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baz", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - baz: typing.Union[MetaOapg.properties.baz, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - baz=baz, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithBaseSchema': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi deleted file mode 100644 index a2d8ed50db0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_base_schema.pyi +++ /dev/null @@ -1,211 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithBaseSchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - class all_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "baz", - } - - class properties: - baz = schemas.NoneSchema - __annotations__ = { - "baz": baz, - } - - - baz: MetaOapg.properties.baz - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["baz", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["baz", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - baz: typing.Union[MetaOapg.properties.baz, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - baz=baz, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithBaseSchema': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py deleted file mode 100644 index 66d64a6d84f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithOneEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithOneEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi deleted file mode 100644 index 66d64a6d84f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_one_empty_schema.pyi +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithOneEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithOneEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py deleted file mode 100644 index d4e8af5a1e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTheFirstEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - all_of_1 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTheFirstEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi deleted file mode 100644 index d4e8af5a1e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_first_empty_schema.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTheFirstEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - all_of_1 = schemas.NumberSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTheFirstEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py deleted file mode 100644 index 18a96eca19c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTheLastEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.NumberSchema - all_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTheLastEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi deleted file mode 100644 index 18a96eca19c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_the_last_empty_schema.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTheLastEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.NumberSchema - all_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTheLastEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py deleted file mode 100644 index ba5f5783b2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTwoEmptySchemas( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - all_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTwoEmptySchemas': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi deleted file mode 100644 index ba5f5783b2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/allof_with_two_empty_schemas.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AllofWithTwoEmptySchemas( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - all_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AllofWithTwoEmptySchemas': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py deleted file mode 100644 index 3792ff6b586..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Anyof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.IntSchema - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - inclusive_minimum = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Anyof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi deleted file mode 100644 index 9cc5c73fd2d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Anyof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.IntSchema - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Anyof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py deleted file mode 100644 index 6bf61e0e753..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofComplexTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyofComplexTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi deleted file mode 100644 index 6bf61e0e753..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_complex_types.pyi +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofComplexTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyofComplexTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py deleted file mode 100644 index 281e1fe4df9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofWithBaseSchema( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - max_length = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - min_length = 4 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AnyofWithBaseSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi deleted file mode 100644 index 3f1b667bca7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_base_schema.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofWithBaseSchema( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class any_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AnyofWithBaseSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py deleted file mode 100644 index a7c4a89c9d0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofWithOneEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.NumberSchema - any_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyofWithOneEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi deleted file mode 100644 index a7c4a89c9d0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/anyof_with_one_empty_schema.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class AnyofWithOneEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.NumberSchema - any_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyofWithOneEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py deleted file mode 100644 index 1d3739deba7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ArrayTypeMatchesArrays( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayTypeMatchesArrays': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi deleted file mode 100644 index 1d3739deba7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/array_type_matches_arrays.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ArrayTypeMatchesArrays( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayTypeMatchesArrays': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.py deleted file mode 100644 index 8e9d55f91a4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -BooleanTypeMatchesBooleans = schemas.BoolSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.pyi deleted file mode 100644 index 8e9d55f91a4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/boolean_type_matches_booleans.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -BooleanTypeMatchesBooleans = schemas.BoolSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py deleted file mode 100644 index 916ccf4c8fd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ByInt( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - multiple_of = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ByInt': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi deleted file mode 100644 index 1ade1d20fc6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_int.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ByInt( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ByInt': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py deleted file mode 100644 index c6c7b904e20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ByNumber( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - multiple_of = 1.5 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ByNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi deleted file mode 100644 index 5e0068ad3fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_number.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ByNumber( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ByNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py deleted file mode 100644 index 7708e25f2a7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class BySmallNumber( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - multiple_of = 0.00010 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BySmallNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi deleted file mode 100644 index c7658f0e2e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/by_small_number.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class BySmallNumber( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BySmallNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py deleted file mode 100644 index 3004856abd5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class DateTimeFormat( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DateTimeFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi deleted file mode 100644 index 3004856abd5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/date_time_format.pyi +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class DateTimeFormat( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DateTimeFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py deleted file mode 100644 index cd12884a058..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EmailFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EmailFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi deleted file mode 100644 index cd12884a058..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/email_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EmailFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EmailFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.py deleted file mode 100644 index 2f77c5996f4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWith0DoesNotMatchFalse( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 0: "POSITIVE_0", - } - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.pyi deleted file mode 100644 index 337edc4956d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with0_does_not_match_false.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWith0DoesNotMatchFalse( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.py deleted file mode 100644 index 2acbb376d63..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWith1DoesNotMatchTrue( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 1: "POSITIVE_1", - } - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.pyi deleted file mode 100644 index 8664a7f747f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with1_does_not_match_true.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWith1DoesNotMatchTrue( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.py deleted file mode 100644 index c8f68c1000d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithEscapedCharacters( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "foo\nbar": "FOO_BAR", - "foo\rbar": "FOO_BAR", - } - - @schemas.classproperty - def FOO_BAR(cls): - return cls("foo\nbar") - - @schemas.classproperty - def FOO_BAR(cls): - return cls("foo\rbar") diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.pyi deleted file mode 100644 index 6fb1827e441..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_escaped_characters.pyi +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithEscapedCharacters( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def FOO_BAR(cls): - return cls("foo\nbar") - - @schemas.classproperty - def FOO_BAR(cls): - return cls("foo\rbar") diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.py deleted file mode 100644 index c4992b57a35..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithFalseDoesNotMatch0( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - schemas.BoolClass.FALSE: "FALSE", - } - - @schemas.classproperty - def FALSE(cls): - return cls(False) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.pyi deleted file mode 100644 index 35ef43076ce..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_false_does_not_match0.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithFalseDoesNotMatch0( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def FALSE(cls): - return cls(False) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.py deleted file mode 100644 index a8e80747103..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithTrueDoesNotMatch1( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - schemas.BoolClass.TRUE: "TRUE", - } - - @schemas.classproperty - def TRUE(cls): - return cls(True) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.pyi deleted file mode 100644 index f86fc0d2810..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enum_with_true_does_not_match1.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumWithTrueDoesNotMatch1( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def TRUE(cls): - return cls(True) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py deleted file mode 100644 index 049126041d5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumsInProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "bar", - } - - class properties: - - - class bar( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "bar": "BAR", - } - - @schemas.classproperty - def BAR(cls): - return cls("bar") - - - class foo( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "foo": "FOO", - } - - @schemas.classproperty - def FOO(cls): - return cls("foo") - __annotations__ = { - "bar": bar, - "foo": foo, - } - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumsInProperties': - return super().__new__( - cls, - *_args, - bar=bar, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi deleted file mode 100644 index b6a19141242..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/enums_in_properties.pyi +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class EnumsInProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "bar", - } - - class properties: - - - class bar( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def BAR(cls): - return cls("bar") - - - class foo( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def FOO(cls): - return cls("foo") - __annotations__ = { - "bar": bar, - "foo": foo, - } - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumsInProperties': - return super().__new__( - cls, - *_args, - bar=bar, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py deleted file mode 100644 index 7e30cfceb35..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ForbiddenProperty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.NotAnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ForbiddenProperty': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi deleted file mode 100644 index 7e30cfceb35..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/forbidden_property.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ForbiddenProperty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.NotAnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ForbiddenProperty': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py deleted file mode 100644 index d63fc48311a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class HostnameFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HostnameFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi deleted file mode 100644 index d63fc48311a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/hostname_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class HostnameFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HostnameFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.py deleted file mode 100644 index ccb986ac466..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -IntegerTypeMatchesIntegers = schemas.IntSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.pyi deleted file mode 100644 index ccb986ac466..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/integer_type_matches_integers.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -IntegerTypeMatchesIntegers = schemas.IntSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py deleted file mode 100644 index 3f5ff42395c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - multiple_of = 0.123456789 diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi deleted file mode 100644 index 33c88d10402..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_instance_should_not_raise_error_when_float_division_inf.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf( - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py deleted file mode 100644 index badf060b3a1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class InvalidStringValueForDefault( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class bar( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 4 - __annotations__ = { - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'InvalidStringValueForDefault': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi deleted file mode 100644 index 4ade4dce933..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/invalid_string_value_for_default.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class InvalidStringValueForDefault( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class bar( - schemas.StrSchema - ): - pass - __annotations__ = { - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'InvalidStringValueForDefault': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py deleted file mode 100644 index 89b1ccc1ca3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Ipv4Format( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ipv4Format': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi deleted file mode 100644 index 89b1ccc1ca3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv4_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Ipv4Format( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ipv4Format': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py deleted file mode 100644 index a33fc23d781..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Ipv6Format( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ipv6Format': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi deleted file mode 100644 index a33fc23d781..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ipv6_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Ipv6Format( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Ipv6Format': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py deleted file mode 100644 index b7f7798cfed..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class JsonPointerFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'JsonPointerFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi deleted file mode 100644 index b7f7798cfed..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/json_pointer_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class JsonPointerFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'JsonPointerFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py deleted file mode 100644 index 2c02065c5ef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaximumValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - inclusive_maximum = 3.0 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaximumValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi deleted file mode 100644 index fb94c3a96d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaximumValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaximumValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py deleted file mode 100644 index e2bd6d9c82f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaximumValidationWithUnsignedInteger( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - inclusive_maximum = 300 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaximumValidationWithUnsignedInteger': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi deleted file mode 100644 index af52478419e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maximum_validation_with_unsigned_integer.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaximumValidationWithUnsignedInteger( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaximumValidationWithUnsignedInteger': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py deleted file mode 100644 index 2c2d2964519..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - max_items = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi deleted file mode 100644 index ee591cf4ac5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxitems_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py deleted file mode 100644 index 9e8bbff5672..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxlengthValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - max_length = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxlengthValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi deleted file mode 100644 index f1d4241ab9d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxlength_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxlengthValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxlengthValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py deleted file mode 100644 index 78c925c92d1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Maxproperties0MeansTheObjectIsEmpty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - max_properties = 0 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Maxproperties0MeansTheObjectIsEmpty': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi deleted file mode 100644 index 2d26e8f679e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties0_means_the_object_is_empty.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Maxproperties0MeansTheObjectIsEmpty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Maxproperties0MeansTheObjectIsEmpty': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py deleted file mode 100644 index 0c29fe0428e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxpropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - max_properties = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxpropertiesValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi deleted file mode 100644 index 9f60d59043c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/maxproperties_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MaxpropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MaxpropertiesValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py deleted file mode 100644 index 82c4ace13f5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinimumValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - inclusive_minimum = 1.1 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinimumValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi deleted file mode 100644 index 9643ac0424c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinimumValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinimumValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py deleted file mode 100644 index 1e4729e9900..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinimumValidationWithSignedInteger( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - inclusive_minimum = -2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinimumValidationWithSignedInteger': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi deleted file mode 100644 index 298bf570dfd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minimum_validation_with_signed_integer.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinimumValidationWithSignedInteger( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinimumValidationWithSignedInteger': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py deleted file mode 100644 index af50bd074f8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - min_items = 1 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi deleted file mode 100644 index 23864e2ce96..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minitems_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py deleted file mode 100644 index d83ad8cb675..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinlengthValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - min_length = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinlengthValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi deleted file mode 100644 index d69c6fcea9b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minlength_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinlengthValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinlengthValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py deleted file mode 100644 index 5e032e7f09a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinpropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - min_properties = 1 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinpropertiesValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi deleted file mode 100644 index ff14e068f97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/minproperties_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class MinpropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MinpropertiesValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py deleted file mode 100644 index fb8e10a0293..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ModelNot( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelNot': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi deleted file mode 100644 index fb8e10a0293..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/model_not.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ModelNot( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelNot': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py deleted file mode 100644 index a948721b22e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedAllofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - all_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedAllofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi deleted file mode 100644 index a948721b22e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_allof_to_check_validation_semantics.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedAllofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - all_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedAllofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py deleted file mode 100644 index 28e998bbd21..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedAnyofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - any_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedAnyofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi deleted file mode 100644 index 28e998bbd21..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_anyof_to_check_validation_semantics.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedAnyofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class any_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - any_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'any_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedAnyofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py deleted file mode 100644 index 53008830119..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NestedItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi deleted file mode 100644 index 53008830119..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_items.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NestedItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py deleted file mode 100644 index 4e855cfc082..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedOneofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedOneofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi deleted file mode 100644 index 4e855cfc082..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nested_oneof_to_check_validation_semantics.pyi +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NestedOneofToCheckValidationSemantics( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.ComposedSchema, - ): - - - class MetaOapg: - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NestedOneofToCheckValidationSemantics': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py deleted file mode 100644 index 111590e7b3d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NotMoreComplexSchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NotMoreComplexSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi deleted file mode 100644 index 111590e7b3d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/not_more_complex_schema.pyi +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NotMoreComplexSchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NotMoreComplexSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.py deleted file mode 100644 index 3aa6a9fe9ba..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NulCharactersInStrings( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "hello\x00there": "HELLOTHERE", - } - - @schemas.classproperty - def HELLOTHERE(cls): - return cls("hello\x00there") diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.pyi deleted file mode 100644 index eb9d42800cf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/nul_characters_in_strings.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class NulCharactersInStrings( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def HELLOTHERE(cls): - return cls("hello\x00there") diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.py deleted file mode 100644 index 4b1bff62a13..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -NullTypeMatchesOnlyTheNullObject = schemas.NoneSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.pyi deleted file mode 100644 index 4b1bff62a13..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/null_type_matches_only_the_null_object.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -NullTypeMatchesOnlyTheNullObject = schemas.NoneSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.py deleted file mode 100644 index e4d1d79b975..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -NumberTypeMatchesNumbers = schemas.NumberSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.pyi deleted file mode 100644 index e4d1d79b975..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/number_type_matches_numbers.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -NumberTypeMatchesNumbers = schemas.NumberSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py deleted file mode 100644 index d5e7c6cf931..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ObjectPropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.IntSchema - bar = schemas.StrSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, decimal.Decimal, int, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectPropertiesValidation': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi deleted file mode 100644 index d5e7c6cf931..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/object_properties_validation.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class ObjectPropertiesValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.IntSchema - bar = schemas.StrSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, decimal.Decimal, int, schemas.Unset] = schemas.unset, - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectPropertiesValidation': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py deleted file mode 100644 index 3b54b5a2ecc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Oneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.IntSchema - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - inclusive_minimum = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Oneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi deleted file mode 100644 index f896a11c67e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class Oneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.IntSchema - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Oneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py deleted file mode 100644 index 3867b8e3d03..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofComplexTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofComplexTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi deleted file mode 100644 index 3867b8e3d03..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_complex_types.pyi +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofComplexTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - } - - class properties: - bar = schemas.IntSchema - __annotations__ = { - "bar": bar, - } - - - bar: MetaOapg.properties.bar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofComplexTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py deleted file mode 100644 index bc743b52219..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithBaseSchema( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - min_length = 2 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - max_length = 4 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'OneofWithBaseSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi deleted file mode 100644 index 4d521f17ab4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_base_schema.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithBaseSchema( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'OneofWithBaseSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py deleted file mode 100644 index 6c106531e09..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.NumberSchema - one_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofWithEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi deleted file mode 100644 index 6c106531e09..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_empty_schema.pyi +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithEmptySchema( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.NumberSchema - one_of_1 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofWithEmptySchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py deleted file mode 100644 index 65e3c48bd59..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithRequired( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - "foo", - } - - - bar: schemas.AnyTypeSchema - foo: schemas.AnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - "baz", - } - - - foo: schemas.AnyTypeSchema - baz: schemas.AnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofWithRequired': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi deleted file mode 100644 index 65e3c48bd59..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/oneof_with_required.pyi +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class OneofWithRequired( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class one_of_0( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "bar", - "foo", - } - - - bar: schemas.AnyTypeSchema - foo: schemas.AnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_1( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - required = { - "foo", - "baz", - } - - - foo: schemas.AnyTypeSchema - baz: schemas.AnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - cls.one_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OneofWithRequired': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py deleted file mode 100644 index c28ee2c4e94..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PatternIsNotAnchored( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - regex=[{ - 'pattern': r'a+', # noqa: E501 - }] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PatternIsNotAnchored': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi deleted file mode 100644 index 23cf254031e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_is_not_anchored.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PatternIsNotAnchored( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PatternIsNotAnchored': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py deleted file mode 100644 index 6c35cf6a752..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PatternValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - regex=[{ - 'pattern': r'^a*$', # noqa: E501 - }] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PatternValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi deleted file mode 100644 index c0b53bd013d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/pattern_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PatternValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PatternValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py deleted file mode 100644 index cac2e048c9c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PropertiesWithEscapedCharacters( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo_nbar = schemas.NumberSchema - foo_bar = schemas.NumberSchema - foo__bar = schemas.NumberSchema - foo_rbar = schemas.NumberSchema - foo_tbar = schemas.NumberSchema - foo_fbar = schemas.NumberSchema - __annotations__ = { - "foo\nbar": foo_nbar, - "foo\"bar": foo_bar, - "foo\\bar": foo__bar, - "foo\rbar": foo_rbar, - "foo\tbar": foo_tbar, - "foo\fbar": foo_fbar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\nbar"]) -> MetaOapg.properties.foo_nbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\"bar"]) -> MetaOapg.properties.foo_bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\\bar"]) -> MetaOapg.properties.foo__bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\rbar"]) -> MetaOapg.properties.foo_rbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\tbar"]) -> MetaOapg.properties.foo_tbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\nbar"]) -> typing.Union[MetaOapg.properties.foo_nbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\"bar"]) -> typing.Union[MetaOapg.properties.foo_bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\\bar"]) -> typing.Union[MetaOapg.properties.foo__bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\rbar"]) -> typing.Union[MetaOapg.properties.foo_rbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\tbar"]) -> typing.Union[MetaOapg.properties.foo_tbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PropertiesWithEscapedCharacters': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi deleted file mode 100644 index cac2e048c9c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/properties_with_escaped_characters.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PropertiesWithEscapedCharacters( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo_nbar = schemas.NumberSchema - foo_bar = schemas.NumberSchema - foo__bar = schemas.NumberSchema - foo_rbar = schemas.NumberSchema - foo_tbar = schemas.NumberSchema - foo_fbar = schemas.NumberSchema - __annotations__ = { - "foo\nbar": foo_nbar, - "foo\"bar": foo_bar, - "foo\\bar": foo__bar, - "foo\rbar": foo_rbar, - "foo\tbar": foo_tbar, - "foo\fbar": foo_fbar, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\nbar"]) -> MetaOapg.properties.foo_nbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\"bar"]) -> MetaOapg.properties.foo_bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\\bar"]) -> MetaOapg.properties.foo__bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\rbar"]) -> MetaOapg.properties.foo_rbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\tbar"]) -> MetaOapg.properties.foo_tbar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo\fbar"]) -> MetaOapg.properties.foo_fbar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\nbar"]) -> typing.Union[MetaOapg.properties.foo_nbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\"bar"]) -> typing.Union[MetaOapg.properties.foo_bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\\bar"]) -> typing.Union[MetaOapg.properties.foo__bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\rbar"]) -> typing.Union[MetaOapg.properties.foo_rbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\tbar"]) -> typing.Union[MetaOapg.properties.foo_tbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo\fbar"]) -> typing.Union[MetaOapg.properties.foo_fbar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo\nbar", "foo\"bar", "foo\\bar", "foo\rbar", "foo\tbar", "foo\fbar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PropertiesWithEscapedCharacters': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py deleted file mode 100644 index 45e0df45067..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PropertyNamedRefThatIsNotAReference( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - ref = schemas.StrSchema - __annotations__ = { - "$ref": ref, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["$ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["$ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["$ref"]) -> typing.Union[MetaOapg.properties.ref, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["$ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PropertyNamedRefThatIsNotAReference': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi deleted file mode 100644 index 45e0df45067..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/property_named_ref_that_is_not_a_reference.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class PropertyNamedRefThatIsNotAReference( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - ref = schemas.StrSchema - __annotations__ = { - "$ref": ref, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["$ref"]) -> MetaOapg.properties.ref: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["$ref", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["$ref"]) -> typing.Union[MetaOapg.properties.ref, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["$ref", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'PropertyNamedRefThatIsNotAReference': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py deleted file mode 100644 index 5ae9aeffff8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAdditionalproperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def additional_properties() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - def __getitem__(self, name: typing.Union[str, ]) -> 'PropertyNamedRefThatIsNotAReference': - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> 'PropertyNamedRefThatIsNotAReference': - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'PropertyNamedRefThatIsNotAReference', - ) -> 'RefInAdditionalproperties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi deleted file mode 100644 index 5ae9aeffff8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_additionalproperties.pyi +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAdditionalproperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def additional_properties() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - def __getitem__(self, name: typing.Union[str, ]) -> 'PropertyNamedRefThatIsNotAReference': - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> 'PropertyNamedRefThatIsNotAReference': - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'PropertyNamedRefThatIsNotAReference', - ) -> 'RefInAdditionalproperties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py deleted file mode 100644 index 0fad528f4dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAllof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInAllof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi deleted file mode 100644 index 0fad528f4dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_allof.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAllof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInAllof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py deleted file mode 100644 index f7ce71a11af..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAnyof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInAnyof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi deleted file mode 100644 index f7ce71a11af..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_anyof.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInAnyof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInAnyof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py deleted file mode 100644 index 664bc90905b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RefInItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'PropertyNamedRefThatIsNotAReference': - return super().__getitem__(i) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi deleted file mode 100644 index 664bc90905b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_items.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['PropertyNamedRefThatIsNotAReference'], typing.List['PropertyNamedRefThatIsNotAReference']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'RefInItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'PropertyNamedRefThatIsNotAReference': - return super().__getitem__(i) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py deleted file mode 100644 index b8c574e16b8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInNot( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInNot': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi deleted file mode 100644 index b8c574e16b8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_not.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInNot( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInNot': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py deleted file mode 100644 index 9c76a655bb0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInOneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInOneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi deleted file mode 100644 index 9c76a655bb0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_oneof.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInOneof( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - PropertyNamedRefThatIsNotAReference, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInOneof': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py deleted file mode 100644 index 13f303fa140..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInProperty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def a() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - __annotations__ = { - "a": a, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["a"]) -> 'PropertyNamedRefThatIsNotAReference': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["a"]) -> typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - a: typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInProperty': - return super().__new__( - cls, - *_args, - a=a, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi deleted file mode 100644 index 13f303fa140..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/ref_in_property.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RefInProperty( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def a() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - __annotations__ = { - "a": a, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["a"]) -> 'PropertyNamedRefThatIsNotAReference': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["a"]) -> typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - a: typing.Union['PropertyNamedRefThatIsNotAReference', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RefInProperty': - return super().__new__( - cls, - *_args, - a=a, - _configuration=_configuration, - **kwargs, - ) - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py deleted file mode 100644 index e1e2bfdd424..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredDefaultValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredDefaultValidation': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi deleted file mode 100644 index e1e2bfdd424..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_default_validation.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredDefaultValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredDefaultValidation': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py deleted file mode 100644 index b1905083110..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredValidation': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi deleted file mode 100644 index b1905083110..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_validation.pyi +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "foo", - } - - class properties: - foo = schemas.AnyTypeSchema - bar = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - "bar": bar, - } - - - foo: MetaOapg.properties.foo - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", "bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - bar: typing.Union[MetaOapg.properties.bar, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredValidation': - return super().__new__( - cls, - *_args, - foo=foo, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py deleted file mode 100644 index d91c0e7cf2f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredWithEmptyArray( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredWithEmptyArray': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi deleted file mode 100644 index d91c0e7cf2f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_empty_array.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredWithEmptyArray( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - foo = schemas.AnyTypeSchema - __annotations__ = { - "foo": foo, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - foo: typing.Union[MetaOapg.properties.foo, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredWithEmptyArray': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py deleted file mode 100644 index a482d65db3c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredWithEscapedCharacters( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredWithEscapedCharacters': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi deleted file mode 100644 index a482d65db3c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/required_with_escaped_characters.pyi +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class RequiredWithEscapedCharacters( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'RequiredWithEscapedCharacters': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.py deleted file mode 100644 index 26641b8c99f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class SimpleEnumValidation( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 1: "POSITIVE_1", - 2: "POSITIVE_2", - 3: "POSITIVE_3", - } - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) - - @schemas.classproperty - def POSITIVE_3(cls): - return cls(3) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.pyi deleted file mode 100644 index 61ed175912c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/simple_enum_validation.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class SimpleEnumValidation( - schemas.EnumBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) - - @schemas.classproperty - def POSITIVE_3(cls): - return cls(3) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.py deleted file mode 100644 index 573e83bc999..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -StringTypeMatchesStrings = schemas.StrSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.pyi deleted file mode 100644 index 573e83bc999..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/string_type_matches_strings.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 -StringTypeMatchesStrings = schemas.StrSchema diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py deleted file mode 100644 index 4033b5a2e5d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class alpha( - schemas.NumberSchema - ): - - - class MetaOapg: - inclusive_maximum = 3 - __annotations__ = { - "alpha": alpha, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alpha"]) -> MetaOapg.properties.alpha: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["alpha", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alpha"]) -> typing.Union[MetaOapg.properties.alpha, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["alpha", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - alpha: typing.Union[MetaOapg.properties.alpha, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing': - return super().__new__( - cls, - *_args, - alpha=alpha, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi deleted file mode 100644 index 4deb08abe2a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/the_default_keyword_does_not_do_anything_if_the_property_is_missing.pyi +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class alpha( - schemas.NumberSchema - ): - pass - __annotations__ = { - "alpha": alpha, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["alpha"]) -> MetaOapg.properties.alpha: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["alpha", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["alpha"]) -> typing.Union[MetaOapg.properties.alpha, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["alpha", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - alpha: typing.Union[MetaOapg.properties.alpha, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing': - return super().__new__( - cls, - *_args, - alpha=alpha, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py deleted file mode 100644 index 9a1260048ba..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UniqueitemsFalseValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - unique_items = False - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UniqueitemsFalseValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi deleted file mode 100644 index e1854bc77e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_false_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UniqueitemsFalseValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UniqueitemsFalseValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py deleted file mode 100644 index 33f292d4ea3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UniqueitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - unique_items = True - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UniqueitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi deleted file mode 100644 index c23e7c8a006..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uniqueitems_validation.pyi +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UniqueitemsValidation( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UniqueitemsValidation': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py deleted file mode 100644 index 7ade387ae23..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi deleted file mode 100644 index 7ade387ae23..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py deleted file mode 100644 index 5fc3716e2db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriReferenceFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriReferenceFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi deleted file mode 100644 index 5fc3716e2db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_reference_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriReferenceFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriReferenceFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py deleted file mode 100644 index fa7bdb515fd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriTemplateFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriTemplateFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi deleted file mode 100644 index fa7bdb515fd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/model/uri_template_format.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - -class UriTemplateFormat( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'UriTemplateFormat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py deleted file mode 100644 index aac639450c1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/models/__init__.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from unit_test_api.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators -from unit_test_api.model.allof import Allof -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof -from unit_test_api.model.allof_simple_types import AllofSimpleTypes -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas -from unit_test_api.model.anyof import Anyof -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays -from unit_test_api.model.boolean_type_matches_booleans import BooleanTypeMatchesBooleans -from unit_test_api.model.by_int import ByInt -from unit_test_api.model.by_number import ByNumber -from unit_test_api.model.by_small_number import BySmallNumber -from unit_test_api.model.date_time_format import DateTimeFormat -from unit_test_api.model.email_format import EmailFormat -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 -from unit_test_api.model.enums_in_properties import EnumsInProperties -from unit_test_api.model.forbidden_property import ForbiddenProperty -from unit_test_api.model.hostname_format import HostnameFormat -from unit_test_api.model.integer_type_matches_integers import IntegerTypeMatchesIntegers -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault -from unit_test_api.model.ipv4_format import Ipv4Format -from unit_test_api.model.ipv6_format import Ipv6Format -from unit_test_api.model.json_pointer_format import JsonPointerFormat -from unit_test_api.model.maximum_validation import MaximumValidation -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger -from unit_test_api.model.maxitems_validation import MaxitemsValidation -from unit_test_api.model.maxlength_validation import MaxlengthValidation -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation -from unit_test_api.model.minimum_validation import MinimumValidation -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger -from unit_test_api.model.minitems_validation import MinitemsValidation -from unit_test_api.model.minlength_validation import MinlengthValidation -from unit_test_api.model.minproperties_validation import MinpropertiesValidation -from unit_test_api.model.model_not import ModelNot -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics -from unit_test_api.model.nested_items import NestedItems -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics -from unit_test_api.model.not_more_complex_schema import NotMoreComplexSchema -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings -from unit_test_api.model.null_type_matches_only_the_null_object import NullTypeMatchesOnlyTheNullObject -from unit_test_api.model.number_type_matches_numbers import NumberTypeMatchesNumbers -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation -from unit_test_api.model.oneof import Oneof -from unit_test_api.model.oneof_complex_types import OneofComplexTypes -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema -from unit_test_api.model.oneof_with_required import OneofWithRequired -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored -from unit_test_api.model.pattern_validation import PatternValidation -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties -from unit_test_api.model.ref_in_allof import RefInAllof -from unit_test_api.model.ref_in_anyof import RefInAnyof -from unit_test_api.model.ref_in_items import RefInItems -from unit_test_api.model.ref_in_not import RefInNot -from unit_test_api.model.ref_in_oneof import RefInOneof -from unit_test_api.model.ref_in_property import RefInProperty -from unit_test_api.model.required_default_validation import RequiredDefaultValidation -from unit_test_api.model.required_validation import RequiredValidation -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray -from unit_test_api.model.required_with_escaped_characters import RequiredWithEscapedCharacters -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation -from unit_test_api.model.string_type_matches_strings import StringTypeMatchesStrings -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation -from unit_test_api.model.uri_format import UriFormat -from unit_test_api.model.uri_reference_format import UriReferenceFormat -from unit_test_api.model.uri_template_format import UriTemplateFormat diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/__init__.py deleted file mode 100644 index 2522dcf8f19..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/__init__.py +++ /dev/null @@ -1,182 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.apis.path_to_api import path_to_api - -import enum - - -class PathValues(str, enum.Enum): - REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY = "/requestBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody" - RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes" - REQUEST_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_REQUEST_BODY = "/requestBody/postAdditionalpropertiesCanExistByItselfRequestBody" - RESPONSE_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes" - REQUEST_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_REQUEST_BODY = "/requestBody/postAdditionalpropertiesAreAllowedByDefaultRequestBody" - RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes" - REQUEST_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_REQUEST_BODY = "/requestBody/postAdditionalpropertiesShouldNotLookInApplicatorsRequestBody" - RESPONSE_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_REQUEST_BODY = "/requestBody/postAllofRequestBody" - RESPONSE_BODY_POST_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_WITH_BASE_SCHEMA_REQUEST_BODY = "/requestBody/postAllofWithBaseSchemaRequestBody" - RESPONSE_BODY_POST_ALLOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofWithBaseSchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_SIMPLE_TYPES_REQUEST_BODY = "/requestBody/postAllofSimpleTypesRequestBody" - RESPONSE_BODY_POST_ALLOF_SIMPLE_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofSimpleTypesResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postAllofWithOneEmptySchemaRequestBody" - RESPONSE_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofWithOneEmptySchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_REQUEST_BODY = "/requestBody/postAllofWithTwoEmptySchemasRequestBody" - RESPONSE_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofWithTwoEmptySchemasResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postAllofWithTheFirstEmptySchemaRequestBody" - RESPONSE_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofWithTheFirstEmptySchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postAllofWithTheLastEmptySchemaRequestBody" - RESPONSE_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofWithTheLastEmptySchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY = "/requestBody/postNestedAllofToCheckValidationSemanticsRequestBody" - RESPONSE_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes" - REQUEST_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_REQUEST_BODY = "/requestBody/postAllofCombinedWithAnyofOneofRequestBody" - RESPONSE_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAllofCombinedWithAnyofOneofResponseBodyForContentTypes" - REQUEST_BODY_POST_ANYOF_REQUEST_BODY = "/requestBody/postAnyofRequestBody" - RESPONSE_BODY_POST_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAnyofResponseBodyForContentTypes" - REQUEST_BODY_POST_ANYOF_WITH_BASE_SCHEMA_REQUEST_BODY = "/requestBody/postAnyofWithBaseSchemaRequestBody" - RESPONSE_BODY_POST_ANYOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAnyofWithBaseSchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ANYOF_COMPLEX_TYPES_REQUEST_BODY = "/requestBody/postAnyofComplexTypesRequestBody" - RESPONSE_BODY_POST_ANYOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAnyofComplexTypesResponseBodyForContentTypes" - REQUEST_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postAnyofWithOneEmptySchemaRequestBody" - RESPONSE_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postAnyofWithOneEmptySchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY = "/requestBody/postNestedAnyofToCheckValidationSemanticsRequestBody" - RESPONSE_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes" - REQUEST_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_REQUEST_BODY = "/requestBody/postInvalidStringValueForDefaultRequestBody" - RESPONSE_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postInvalidStringValueForDefaultResponseBodyForContentTypes" - REQUEST_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_REQUEST_BODY = "/requestBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody" - RESPONSE_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes" - REQUEST_BODY_POST_SIMPLE_ENUM_VALIDATION_REQUEST_BODY = "/requestBody/postSimpleEnumValidationRequestBody" - RESPONSE_BODY_POST_SIMPLE_ENUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postSimpleEnumValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUMS_IN_PROPERTIES_REQUEST_BODY = "/requestBody/postEnumsInPropertiesRequestBody" - RESPONSE_BODY_POST_ENUMS_IN_PROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumsInPropertiesResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_REQUEST_BODY = "/requestBody/postEnumWithEscapedCharactersRequestBody" - RESPONSE_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumWithEscapedCharactersResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0REQUEST_BODY = "/requestBody/postEnumWithFalseDoesNotMatch0RequestBody" - RESPONSE_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1REQUEST_BODY = "/requestBody/postEnumWithTrueDoesNotMatch1RequestBody" - RESPONSE_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_REQUEST_BODY = "/requestBody/postEnumWith0DoesNotMatchFalseRequestBody" - RESPONSE_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumWith0DoesNotMatchFalseResponseBodyForContentTypes" - REQUEST_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_REQUEST_BODY = "/requestBody/postEnumWith1DoesNotMatchTrueRequestBody" - RESPONSE_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEnumWith1DoesNotMatchTrueResponseBodyForContentTypes" - REQUEST_BODY_POST_NUL_CHARACTERS_IN_STRINGS_REQUEST_BODY = "/requestBody/postNulCharactersInStringsRequestBody" - RESPONSE_BODY_POST_NUL_CHARACTERS_IN_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNulCharactersInStringsResponseBodyForContentTypes" - REQUEST_BODY_POST_EMAIL_FORMAT_REQUEST_BODY = "/requestBody/postEmailFormatRequestBody" - RESPONSE_BODY_POST_EMAIL_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postEmailFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_IPV4FORMAT_REQUEST_BODY = "/requestBody/postIpv4FormatRequestBody" - RESPONSE_BODY_POST_IPV4FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postIpv4FormatResponseBodyForContentTypes" - REQUEST_BODY_POST_IPV6FORMAT_REQUEST_BODY = "/requestBody/postIpv6FormatRequestBody" - RESPONSE_BODY_POST_IPV6FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postIpv6FormatResponseBodyForContentTypes" - REQUEST_BODY_POST_HOSTNAME_FORMAT_REQUEST_BODY = "/requestBody/postHostnameFormatRequestBody" - RESPONSE_BODY_POST_HOSTNAME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postHostnameFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_DATE_TIME_FORMAT_REQUEST_BODY = "/requestBody/postDateTimeFormatRequestBody" - RESPONSE_BODY_POST_DATE_TIME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postDateTimeFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_JSON_POINTER_FORMAT_REQUEST_BODY = "/requestBody/postJsonPointerFormatRequestBody" - RESPONSE_BODY_POST_JSON_POINTER_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postJsonPointerFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_URI_FORMAT_REQUEST_BODY = "/requestBody/postUriFormatRequestBody" - RESPONSE_BODY_POST_URI_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postUriFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_URI_REFERENCE_FORMAT_REQUEST_BODY = "/requestBody/postUriReferenceFormatRequestBody" - RESPONSE_BODY_POST_URI_REFERENCE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postUriReferenceFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_URI_TEMPLATE_FORMAT_REQUEST_BODY = "/requestBody/postUriTemplateFormatRequestBody" - RESPONSE_BODY_POST_URI_TEMPLATE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postUriTemplateFormatResponseBodyForContentTypes" - REQUEST_BODY_POST_NESTED_ITEMS_REQUEST_BODY = "/requestBody/postNestedItemsRequestBody" - RESPONSE_BODY_POST_NESTED_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNestedItemsResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXIMUM_VALIDATION_REQUEST_BODY = "/requestBody/postMaximumValidationRequestBody" - RESPONSE_BODY_POST_MAXIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaximumValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_REQUEST_BODY = "/requestBody/postMaximumValidationWithUnsignedIntegerRequestBody" - RESPONSE_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXITEMS_VALIDATION_REQUEST_BODY = "/requestBody/postMaxitemsValidationRequestBody" - RESPONSE_BODY_POST_MAXITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaxitemsValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXLENGTH_VALIDATION_REQUEST_BODY = "/requestBody/postMaxlengthValidationRequestBody" - RESPONSE_BODY_POST_MAXLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaxlengthValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXPROPERTIES_VALIDATION_REQUEST_BODY = "/requestBody/postMaxpropertiesValidationRequestBody" - RESPONSE_BODY_POST_MAXPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaxpropertiesValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_REQUEST_BODY = "/requestBody/postMaxproperties0MeansTheObjectIsEmptyRequestBody" - RESPONSE_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes" - REQUEST_BODY_POST_MINIMUM_VALIDATION_REQUEST_BODY = "/requestBody/postMinimumValidationRequestBody" - RESPONSE_BODY_POST_MINIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMinimumValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_REQUEST_BODY = "/requestBody/postMinimumValidationWithSignedIntegerRequestBody" - RESPONSE_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMinimumValidationWithSignedIntegerResponseBodyForContentTypes" - REQUEST_BODY_POST_MINITEMS_VALIDATION_REQUEST_BODY = "/requestBody/postMinitemsValidationRequestBody" - RESPONSE_BODY_POST_MINITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMinitemsValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MINLENGTH_VALIDATION_REQUEST_BODY = "/requestBody/postMinlengthValidationRequestBody" - RESPONSE_BODY_POST_MINLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMinlengthValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_MINPROPERTIES_VALIDATION_REQUEST_BODY = "/requestBody/postMinpropertiesValidationRequestBody" - RESPONSE_BODY_POST_MINPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postMinpropertiesValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_BY_INT_REQUEST_BODY = "/requestBody/postByIntRequestBody" - RESPONSE_BODY_POST_BY_INT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postByIntResponseBodyForContentTypes" - REQUEST_BODY_POST_BY_NUMBER_REQUEST_BODY = "/requestBody/postByNumberRequestBody" - RESPONSE_BODY_POST_BY_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postByNumberResponseBodyForContentTypes" - REQUEST_BODY_POST_BY_SMALL_NUMBER_REQUEST_BODY = "/requestBody/postBySmallNumberRequestBody" - RESPONSE_BODY_POST_BY_SMALL_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postBySmallNumberResponseBodyForContentTypes" - REQUEST_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_REQUEST_BODY = "/requestBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody" - RESPONSE_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes" - REQUEST_BODY_POST_NOT_REQUEST_BODY = "/requestBody/postNotRequestBody" - RESPONSE_BODY_POST_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNotResponseBodyForContentTypes" - REQUEST_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_REQUEST_BODY = "/requestBody/postNotMoreComplexSchemaRequestBody" - RESPONSE_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNotMoreComplexSchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_FORBIDDEN_PROPERTY_REQUEST_BODY = "/requestBody/postForbiddenPropertyRequestBody" - RESPONSE_BODY_POST_FORBIDDEN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postForbiddenPropertyResponseBodyForContentTypes" - REQUEST_BODY_POST_ONEOF_REQUEST_BODY = "/requestBody/postOneofRequestBody" - RESPONSE_BODY_POST_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofResponseBodyForContentTypes" - REQUEST_BODY_POST_ONEOF_WITH_BASE_SCHEMA_REQUEST_BODY = "/requestBody/postOneofWithBaseSchemaRequestBody" - RESPONSE_BODY_POST_ONEOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofWithBaseSchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ONEOF_COMPLEX_TYPES_REQUEST_BODY = "/requestBody/postOneofComplexTypesRequestBody" - RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofComplexTypesResponseBodyForContentTypes" - REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY = "/requestBody/postOneofWithEmptySchemaRequestBody" - RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofWithEmptySchemaResponseBodyForContentTypes" - REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY = "/requestBody/postOneofWithRequiredRequestBody" - RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postOneofWithRequiredResponseBodyForContentTypes" - REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY = "/requestBody/postNestedOneofToCheckValidationSemanticsRequestBody" - RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes" - REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY = "/requestBody/postPatternValidationRequestBody" - RESPONSE_BODY_POST_PATTERN_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postPatternValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_PATTERN_IS_NOT_ANCHORED_REQUEST_BODY = "/requestBody/postPatternIsNotAnchoredRequestBody" - RESPONSE_BODY_POST_PATTERN_IS_NOT_ANCHORED_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postPatternIsNotAnchoredResponseBodyForContentTypes" - REQUEST_BODY_POST_OBJECT_PROPERTIES_VALIDATION_REQUEST_BODY = "/requestBody/postObjectPropertiesValidationRequestBody" - RESPONSE_BODY_POST_OBJECT_PROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postObjectPropertiesValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_REQUEST_BODY = "/requestBody/postPropertiesWithEscapedCharactersRequestBody" - RESPONSE_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postPropertiesWithEscapedCharactersResponseBodyForContentTypes" - REQUEST_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_REQUEST_BODY = "/requestBody/postPropertyNamedRefThatIsNotAReferenceRequestBody" - RESPONSE_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_ADDITIONALPROPERTIES_REQUEST_BODY = "/requestBody/postRefInAdditionalpropertiesRequestBody" - RESPONSE_BODY_POST_REF_IN_ADDITIONALPROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInAdditionalpropertiesResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_ITEMS_REQUEST_BODY = "/requestBody/postRefInItemsRequestBody" - RESPONSE_BODY_POST_REF_IN_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInItemsResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_PROPERTY_REQUEST_BODY = "/requestBody/postRefInPropertyRequestBody" - RESPONSE_BODY_POST_REF_IN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInPropertyResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_ALLOF_REQUEST_BODY = "/requestBody/postRefInAllofRequestBody" - RESPONSE_BODY_POST_REF_IN_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInAllofResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_ONEOF_REQUEST_BODY = "/requestBody/postRefInOneofRequestBody" - RESPONSE_BODY_POST_REF_IN_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInOneofResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_ANYOF_REQUEST_BODY = "/requestBody/postRefInAnyofRequestBody" - RESPONSE_BODY_POST_REF_IN_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInAnyofResponseBodyForContentTypes" - REQUEST_BODY_POST_REF_IN_NOT_REQUEST_BODY = "/requestBody/postRefInNotRequestBody" - RESPONSE_BODY_POST_REF_IN_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRefInNotResponseBodyForContentTypes" - REQUEST_BODY_POST_REQUIRED_VALIDATION_REQUEST_BODY = "/requestBody/postRequiredValidationRequestBody" - RESPONSE_BODY_POST_REQUIRED_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_REQUIRED_DEFAULT_VALIDATION_REQUEST_BODY = "/requestBody/postRequiredDefaultValidationRequestBody" - RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredDefaultValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY = "/requestBody/postRequiredWithEmptyArrayRequestBody" - RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredWithEmptyArrayResponseBodyForContentTypes" - REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY = "/requestBody/postRequiredWithEscapedCharactersRequestBody" - RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postRequiredWithEscapedCharactersResponseBodyForContentTypes" - REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY = "/requestBody/postIntegerTypeMatchesIntegersRequestBody" - RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postIntegerTypeMatchesIntegersResponseBodyForContentTypes" - REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY = "/requestBody/postNumberTypeMatchesNumbersRequestBody" - RESPONSE_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNumberTypeMatchesNumbersResponseBodyForContentTypes" - REQUEST_BODY_POST_STRING_TYPE_MATCHES_STRINGS_REQUEST_BODY = "/requestBody/postStringTypeMatchesStringsRequestBody" - RESPONSE_BODY_POST_STRING_TYPE_MATCHES_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postStringTypeMatchesStringsResponseBodyForContentTypes" - REQUEST_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_REQUEST_BODY = "/requestBody/postObjectTypeMatchesObjectsRequestBody" - RESPONSE_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postObjectTypeMatchesObjectsResponseBodyForContentTypes" - REQUEST_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_REQUEST_BODY = "/requestBody/postBooleanTypeMatchesBooleansRequestBody" - RESPONSE_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postBooleanTypeMatchesBooleansResponseBodyForContentTypes" - REQUEST_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_REQUEST_BODY = "/requestBody/postNullTypeMatchesOnlyTheNullObjectRequestBody" - RESPONSE_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes" - REQUEST_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_REQUEST_BODY = "/requestBody/postArrayTypeMatchesArraysRequestBody" - RESPONSE_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postArrayTypeMatchesArraysResponseBodyForContentTypes" - REQUEST_BODY_POST_UNIQUEITEMS_VALIDATION_REQUEST_BODY = "/requestBody/postUniqueitemsValidationRequestBody" - RESPONSE_BODY_POST_UNIQUEITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postUniqueitemsValidationResponseBodyForContentTypes" - REQUEST_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_REQUEST_BODY = "/requestBody/postUniqueitemsFalseValidationRequestBody" - RESPONSE_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES = "/responseBody/postUniqueitemsFalseValidationResponseBodyForContentTypes" diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py deleted file mode 100644 index 70345f0107d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py deleted file mode 100644 index 5f10a127c2d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate - - -request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_allows_a_schema_which_should_validate.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi deleted file mode 100644 index 3ec2f37fae0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_allows_a_schema_which_should_validate_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate - - -request_body_additionalproperties_allows_a_schema_which_should_validate = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_allows_a_schema_which_should_validate.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_allows_a_schema_which_should_validate_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py deleted file mode 100644 index 6430d2326ae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_additionalproperties_are_allowed_by_default_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py deleted file mode 100644 index 00eeab16165..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault - - -request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_are_allowed_by_default.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi deleted file mode 100644 index 27163ff769d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_are_allowed_by_default_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault - - -request_body_additionalproperties_are_allowed_by_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_are_allowed_by_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_are_allowed_by_default.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAreAllowedByDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_are_allowed_by_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py deleted file mode 100644 index 96c4aff53e5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_additionalproperties_can_exist_by_itself_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py deleted file mode 100644 index 7a793a714d2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself - - -request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_can_exist_by_itself.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi deleted file mode 100644 index 73568bd9c01..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_can_exist_by_itself_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesCanExistByItself - - -request_body_additionalproperties_can_exist_by_itself = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_can_exist_by_itself_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_can_exist_by_itself.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesCanExistByItselfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_can_exist_by_itself_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py deleted file mode 100644 index 7777dd53d63..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_additionalproperties_should_not_look_in_applicators_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py deleted file mode 100644 index adc08b4f7f4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators - - -request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_should_not_look_in_applicators.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi deleted file mode 100644 index 8fdd9d8902e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_additionalproperties_should_not_look_in_applicators_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators - -# body param -SchemaForRequestBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators - - -request_body_additionalproperties_should_not_look_in_applicators = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_additionalproperties_should_not_look_in_applicators.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_should_not_look_in_applicators_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py deleted file mode 100644 index 60e8ae1384e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_combined_with_anyof_oneof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py deleted file mode 100644 index 1f658c45534..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof - - -request_body_allof_combined_with_anyof_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_combined_with_anyof_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi deleted file mode 100644 index f2a7c77527f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_combined_with_anyof_oneof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof - -# body param -SchemaForRequestBodyApplicationJson = AllofCombinedWithAnyofOneof - - -request_body_allof_combined_with_anyof_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_combined_with_anyof_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_combined_with_anyof_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofCombinedWithAnyofOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_combined_with_anyof_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/__init__.py deleted file mode 100644 index 00e22cf1437..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py deleted file mode 100644 index 172bf601890..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof import Allof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Allof - - -request_body_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi deleted file mode 100644 index c81e5055cae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof import Allof - -# body param -SchemaForRequestBodyApplicationJson = Allof - - -request_body_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py deleted file mode 100644 index 0a136645b84..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_simple_types_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_SIMPLE_TYPES_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py deleted file mode 100644 index 61eb3a05e54..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_simple_types import AllofSimpleTypes - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofSimpleTypes - - -request_body_allof_simple_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_simple_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofSimpleTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi deleted file mode 100644 index 4f7e092ea7f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_simple_types_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_simple_types import AllofSimpleTypes - -# body param -SchemaForRequestBodyApplicationJson = AllofSimpleTypes - - -request_body_allof_simple_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_simple_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_simple_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofSimpleTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_simple_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 65a8c436dd9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_with_base_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_WITH_BASE_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py deleted file mode 100644 index 9cba8c53f9d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofWithBaseSchema - - -request_body_allof_with_base_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_base_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi deleted file mode 100644 index bccddbd496a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_base_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema - -# body param -SchemaForRequestBodyApplicationJson = AllofWithBaseSchema - - -request_body_allof_with_base_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_base_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index 1dcfbcb8c42..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_with_one_empty_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py deleted file mode 100644 index 0cb60b25a72..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema - - -request_body_allof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_one_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi deleted file mode 100644 index 029ae069ae1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_one_empty_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema - -# body param -SchemaForRequestBodyApplicationJson = AllofWithOneEmptySchema - - -request_body_allof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_one_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py deleted file mode 100644 index 404be3a1692..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_with_the_first_empty_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py deleted file mode 100644 index 60858c1b0b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema - - -request_body_allof_with_the_first_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_the_first_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi deleted file mode 100644 index 2c1db939373..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_first_empty_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheFirstEmptySchema - - -request_body_allof_with_the_first_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_first_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_the_first_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheFirstEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_first_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py deleted file mode 100644 index 19dd1d7abff..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_with_the_last_empty_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py deleted file mode 100644 index 1acd473d64d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema - - -request_body_allof_with_the_last_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_the_last_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi deleted file mode 100644 index 207e2b4c3c0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_the_last_empty_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTheLastEmptySchema - - -request_body_allof_with_the_last_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_last_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_the_last_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheLastEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_last_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py deleted file mode 100644 index 9a8175cea1e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_allof_with_two_empty_schemas_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py deleted file mode 100644 index 5f4822f1fbf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas - - -request_body_allof_with_two_empty_schemas = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_two_empty_schemas.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi deleted file mode 100644 index 4d5a90744e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_allof_with_two_empty_schemas_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas - -# body param -SchemaForRequestBodyApplicationJson = AllofWithTwoEmptySchemas - - -request_body_allof_with_two_empty_schemas = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_two_empty_schemas_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_allof_with_two_empty_schemas.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTwoEmptySchemasRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_two_empty_schemas_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py deleted file mode 100644 index cbd8b46e5a4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_anyof_complex_types_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ANYOF_COMPLEX_TYPES_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py deleted file mode 100644 index 992598d12db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AnyofComplexTypes - - -request_body_anyof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof_complex_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi deleted file mode 100644 index b5537f04bc9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_complex_types_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes - -# body param -SchemaForRequestBodyApplicationJson = AnyofComplexTypes - - -request_body_anyof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof_complex_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py deleted file mode 100644 index b4b0fa5ebe3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_anyof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ANYOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py deleted file mode 100644 index 22da84f83bd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof import Anyof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Anyof - - -request_body_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi deleted file mode 100644 index 98e7a30aa9c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof import Anyof - -# body param -SchemaForRequestBodyApplicationJson = Anyof - - -request_body_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 1f25c057036..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_anyof_with_base_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ANYOF_WITH_BASE_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py deleted file mode 100644 index 99ee2f6a392..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi deleted file mode 100644 index f13723f0bdc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_base_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema - -# body param -SchemaForRequestBodyApplicationJson = AnyofWithBaseSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py deleted file mode 100644 index 7f519de28b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_anyof_with_one_empty_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py deleted file mode 100644 index a4f42f22500..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema - - -request_body_anyof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof_with_one_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi deleted file mode 100644 index e2f21e63eea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_anyof_with_one_empty_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema - -# body param -SchemaForRequestBodyApplicationJson = AnyofWithOneEmptySchema - - -request_body_anyof_with_one_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_one_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_anyof_with_one_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithOneEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_one_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py deleted file mode 100644 index 434d64c1f59..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_array_type_matches_arrays_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py deleted file mode 100644 index e2842e964da..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays - - -request_body_array_type_matches_arrays = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_array_type_matches_arrays.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostArrayTypeMatchesArraysRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi deleted file mode 100644 index bf141c0602a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_array_type_matches_arrays_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays - -# body param -SchemaForRequestBodyApplicationJson = ArrayTypeMatchesArrays - - -request_body_array_type_matches_arrays = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_array_type_matches_arrays_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_array_type_matches_arrays.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostArrayTypeMatchesArraysRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_array_type_matches_arrays_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py deleted file mode 100644 index dd529eb0069..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_boolean_type_matches_booleans_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py deleted file mode 100644 index 876c36a9cb3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi deleted file mode 100644 index ef34a83351d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_boolean_type_matches_booleans_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_boolean_type_matches_booleans_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBooleanTypeMatchesBooleansRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_boolean_type_matches_booleans_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,bool, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py deleted file mode 100644 index 1e7404f60cd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_by_int_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_BY_INT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py deleted file mode 100644 index 583d35bfffb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_int import ByInt - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ByInt - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByIntRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi deleted file mode 100644 index 56679019571..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_int_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_int import ByInt - -# body param -SchemaForRequestBodyApplicationJson = ByInt - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_int_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByIntRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_int_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py deleted file mode 100644 index f146d05f52d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_by_number_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_BY_NUMBER_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py deleted file mode 100644 index c48e51d55a6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_number import ByNumber - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ByNumber - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi deleted file mode 100644 index 27e71d6dd4d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_number_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_number import ByNumber - -# body param -SchemaForRequestBodyApplicationJson = ByNumber - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py deleted file mode 100644 index e3016e6929c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_by_small_number_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_BY_SMALL_NUMBER_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py deleted file mode 100644 index dd8a655b0cd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_small_number import BySmallNumber - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = BySmallNumber - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBySmallNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi deleted file mode 100644 index 95e7065dc6e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_by_small_number_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_small_number import BySmallNumber - -# body param -SchemaForRequestBodyApplicationJson = BySmallNumber - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_small_number_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBySmallNumberRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_small_number_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py deleted file mode 100644 index 54e91fac2c0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_date_time_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_DATE_TIME_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py deleted file mode 100644 index 6298f25e742..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.py +++ /dev/null @@ -1,323 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostDateTimeFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi deleted file mode 100644 index be17f98e07d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_date_time_format_request_body/post.pyi +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_date_time_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostDateTimeFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_date_time_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py deleted file mode 100644 index ac461d949ee..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_email_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_EMAIL_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py deleted file mode 100644 index 32b03225435..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEmailFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi deleted file mode 100644 index a82ce392e60..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_email_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_email_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEmailFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_email_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py deleted file mode 100644 index 0d0a92e77a8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enum_with0_does_not_match_false_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py deleted file mode 100644 index c87c81e2a44..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi deleted file mode 100644 index af8dd7481e2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with0_does_not_match_false_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse - -# body param -SchemaForRequestBodyApplicationJson = EnumWith0DoesNotMatchFalse - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with0_does_not_match_false_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith0DoesNotMatchFalseRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with0_does_not_match_false_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py deleted file mode 100644 index ddc8ab96401..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enum_with1_does_not_match_true_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py deleted file mode 100644 index ac32cbc5542..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi deleted file mode 100644 index 072bbbbf164..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with1_does_not_match_true_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue - -# body param -SchemaForRequestBodyApplicationJson = EnumWith1DoesNotMatchTrue - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with1_does_not_match_true_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith1DoesNotMatchTrueRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with1_does_not_match_true_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 69670a038cc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enum_with_escaped_characters_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py deleted file mode 100644 index 2c83747d7a6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi deleted file mode 100644 index ac4b2d2140f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_escaped_characters_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters - -# body param -SchemaForRequestBodyApplicationJson = EnumWithEscapedCharacters - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py deleted file mode 100644 index 3d8993bf56e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enum_with_false_does_not_match0_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py deleted file mode 100644 index fd7cb2b5a77..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0 - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi deleted file mode 100644 index 1762519a557..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_false_does_not_match0_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 - -# body param -SchemaForRequestBodyApplicationJson = EnumWithFalseDoesNotMatch0 - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_false_does_not_match0_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithFalseDoesNotMatch0RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_false_does_not_match0_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py deleted file mode 100644 index 7cec94a70c1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enum_with_true_does_not_match1_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py deleted file mode 100644 index 47c7ab13562..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1 - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi deleted file mode 100644 index c6dd660b93f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enum_with_true_does_not_match1_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 - -# body param -SchemaForRequestBodyApplicationJson = EnumWithTrueDoesNotMatch1 - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_true_does_not_match1_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithTrueDoesNotMatch1RequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_true_does_not_match1_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py deleted file mode 100644 index 9c1d9754609..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_enums_in_properties_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ENUMS_IN_PROPERTIES_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py deleted file mode 100644 index 48ade2c1322..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enums_in_properties import EnumsInProperties - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = EnumsInProperties - - -request_body_enums_in_properties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_enums_in_properties.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumsInPropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi deleted file mode 100644 index 79d1caa283f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_enums_in_properties_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enums_in_properties import EnumsInProperties - -# body param -SchemaForRequestBodyApplicationJson = EnumsInProperties - - -request_body_enums_in_properties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enums_in_properties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_enums_in_properties.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumsInPropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enums_in_properties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py deleted file mode 100644 index 3d25a7311c0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_forbidden_property_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_FORBIDDEN_PROPERTY_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py deleted file mode 100644 index 91cd9f98522..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.forbidden_property import ForbiddenProperty - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ForbiddenProperty - - -request_body_forbidden_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_forbidden_property.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostForbiddenPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi deleted file mode 100644 index 43721a059ab..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_forbidden_property_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.forbidden_property import ForbiddenProperty - -# body param -SchemaForRequestBodyApplicationJson = ForbiddenProperty - - -request_body_forbidden_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_forbidden_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_forbidden_property.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostForbiddenPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_forbidden_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py deleted file mode 100644 index c02c074d762..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_hostname_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_HOSTNAME_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py deleted file mode 100644 index a02bb9f8b2f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostHostnameFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi deleted file mode 100644 index 036aa7a6ad9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_hostname_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_hostname_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostHostnameFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_hostname_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py deleted file mode 100644 index 4be9e60848d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_integer_type_matches_integers_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py deleted file mode 100644 index 74e7fe12ebc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.IntSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi deleted file mode 100644 index 4b50872d23a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_integer_type_matches_integers_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.IntSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_integer_type_matches_integers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIntegerTypeMatchesIntegersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_integer_type_matches_integers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py deleted file mode 100644 index f60497ab737..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py deleted file mode 100644 index 50b11235a14..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi deleted file mode 100644 index 7384965014d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -# body param -SchemaForRequestBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py deleted file mode 100644 index b00384bdb15..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_invalid_string_value_for_default_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py deleted file mode 100644 index e448ed1f307..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault - - -request_body_invalid_string_value_for_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_invalid_string_value_for_default.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidStringValueForDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi deleted file mode 100644 index fc088687730..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_invalid_string_value_for_default_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault - -# body param -SchemaForRequestBodyApplicationJson = InvalidStringValueForDefault - - -request_body_invalid_string_value_for_default = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_string_value_for_default_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_invalid_string_value_for_default.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidStringValueForDefaultRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_string_value_for_default_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py deleted file mode 100644 index e71b237c897..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ipv4_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_IPV4FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py deleted file mode 100644 index 76be0693c27..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv4FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi deleted file mode 100644 index 29353388c41..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv4_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv4_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv4FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv4_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py deleted file mode 100644 index f9b9074867e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ipv6_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_IPV6FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py deleted file mode 100644 index d914c92afb5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv6FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi deleted file mode 100644 index 73a32e266d3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ipv6_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv6_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv6FormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv6_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py deleted file mode 100644 index aed1ba09bc3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_json_pointer_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_JSON_POINTER_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py deleted file mode 100644 index 20b2e21facf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostJsonPointerFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi deleted file mode 100644 index 7469997aebe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_json_pointer_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_json_pointer_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostJsonPointerFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_json_pointer_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py deleted file mode 100644 index 0c3a5424591..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maximum_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py deleted file mode 100644 index e5314b9f5b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation import MaximumValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MaximumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi deleted file mode 100644 index 221f546283b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation import MaximumValidation - -# body param -SchemaForRequestBodyApplicationJson = MaximumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py deleted file mode 100644 index 01a0a917a1e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maximum_validation_with_unsigned_integer_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py deleted file mode 100644 index e82db4f3a89..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi deleted file mode 100644 index c7a3d545fe8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maximum_validation_with_unsigned_integer_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger - -# body param -SchemaForRequestBodyApplicationJson = MaximumValidationWithUnsignedInteger - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_with_unsigned_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationWithUnsignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_with_unsigned_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py deleted file mode 100644 index 86e4dc9f146..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maxitems_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXITEMS_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py deleted file mode 100644 index 30149f7f35c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxitems_validation import MaxitemsValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MaxitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi deleted file mode 100644 index 4545e992e7f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxitems_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxitems_validation import MaxitemsValidation - -# body param -SchemaForRequestBodyApplicationJson = MaxitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py deleted file mode 100644 index 40b927a792b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maxlength_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXLENGTH_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py deleted file mode 100644 index 5312eaeead1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxlength_validation import MaxlengthValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MaxlengthValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi deleted file mode 100644 index 11014b75597..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxlength_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxlength_validation import MaxlengthValidation - -# body param -SchemaForRequestBodyApplicationJson = MaxlengthValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py deleted file mode 100644 index d0abb2424fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maxproperties0_means_the_object_is_empty_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py deleted file mode 100644 index db06be2cee3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi deleted file mode 100644 index 63dcf2d5e0a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties0_means_the_object_is_empty_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty - -# body param -SchemaForRequestBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties0_means_the_object_is_empty_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxproperties0MeansTheObjectIsEmptyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties0_means_the_object_is_empty_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py deleted file mode 100644 index 40f9c621620..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_maxproperties_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MAXPROPERTIES_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py deleted file mode 100644 index c82334418b8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MaxpropertiesValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi deleted file mode 100644 index 96f125f032e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_maxproperties_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation - -# body param -SchemaForRequestBodyApplicationJson = MaxpropertiesValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py deleted file mode 100644 index a2ebaf49e20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_minimum_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py deleted file mode 100644 index 5d83fb0c687..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation import MinimumValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MinimumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi deleted file mode 100644 index 4ea64ba9efd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation import MinimumValidation - -# body param -SchemaForRequestBodyApplicationJson = MinimumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py deleted file mode 100644 index 55f61d940e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_minimum_validation_with_signed_integer_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py deleted file mode 100644 index 99ce543ccd9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi deleted file mode 100644 index b256a9dbcd9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minimum_validation_with_signed_integer_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger - -# body param -SchemaForRequestBodyApplicationJson = MinimumValidationWithSignedInteger - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_with_signed_integer_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationWithSignedIntegerRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_with_signed_integer_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py deleted file mode 100644 index d4df22e9047..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_minitems_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MINITEMS_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py deleted file mode 100644 index e27d10abbc4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minitems_validation import MinitemsValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MinitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi deleted file mode 100644 index 9d7d5454f17..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minitems_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minitems_validation import MinitemsValidation - -# body param -SchemaForRequestBodyApplicationJson = MinitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py deleted file mode 100644 index b68e6e60ee2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_minlength_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MINLENGTH_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py deleted file mode 100644 index e7fb74b29b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minlength_validation import MinlengthValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MinlengthValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi deleted file mode 100644 index cc3eec06714..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minlength_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minlength_validation import MinlengthValidation - -# body param -SchemaForRequestBodyApplicationJson = MinlengthValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minlength_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinlengthValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minlength_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py deleted file mode 100644 index b76e1db9aae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_minproperties_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_MINPROPERTIES_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py deleted file mode 100644 index bfa4fac8eaf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minproperties_validation import MinpropertiesValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = MinpropertiesValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi deleted file mode 100644 index e28e5f4e532..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_minproperties_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minproperties_validation import MinpropertiesValidation - -# body param -SchemaForRequestBodyApplicationJson = MinpropertiesValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minproperties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinpropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minproperties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 6c1f7d73a44..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_nested_allof_to_check_validation_semantics_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py deleted file mode 100644 index 9cbc5724df2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics - - -request_body_nested_allof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_allof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi deleted file mode 100644 index ee247b34f97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_allof_to_check_validation_semantics_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics - -# body param -SchemaForRequestBodyApplicationJson = NestedAllofToCheckValidationSemantics - - -request_body_nested_allof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_allof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_allof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAllofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_allof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index e7b3408e53d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_nested_anyof_to_check_validation_semantics_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py deleted file mode 100644 index 11756e52963..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics - - -request_body_nested_anyof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_anyof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi deleted file mode 100644 index 92880350b13..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_anyof_to_check_validation_semantics_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics - -# body param -SchemaForRequestBodyApplicationJson = NestedAnyofToCheckValidationSemantics - - -request_body_nested_anyof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_anyof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_anyof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAnyofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_anyof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py deleted file mode 100644 index b38abd53421..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_nested_items_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NESTED_ITEMS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py deleted file mode 100644 index e92ec5f89e0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_items import NestedItems - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NestedItems - - -request_body_nested_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_items.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi deleted file mode 100644 index ab1ec318a3c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_items_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_items import NestedItems - -# body param -SchemaForRequestBodyApplicationJson = NestedItems - - -request_body_nested_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_items.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py deleted file mode 100644 index 8a24e9c066c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_nested_oneof_to_check_validation_semantics_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py deleted file mode 100644 index 3bda1415937..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics - - -request_body_nested_oneof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_oneof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi deleted file mode 100644 index 4fa8b0a4282..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nested_oneof_to_check_validation_semantics_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics - -# body param -SchemaForRequestBodyApplicationJson = NestedOneofToCheckValidationSemantics - - -request_body_nested_oneof_to_check_validation_semantics = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_oneof_to_check_validation_semantics_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_nested_oneof_to_check_validation_semantics.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedOneofToCheckValidationSemanticsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_oneof_to_check_validation_semantics_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py deleted file mode 100644 index c4fccb535c0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_not_more_complex_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py deleted file mode 100644 index 719decbae1e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.py +++ /dev/null @@ -1,371 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotMoreComplexSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi deleted file mode 100644 index dd9a4054ab2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_more_complex_schema_request_body/post.pyi +++ /dev/null @@ -1,366 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_more_complex_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotMoreComplexSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_more_complex_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/__init__.py deleted file mode 100644 index f37c1cc913e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_not_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NOT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py deleted file mode 100644 index e7e0e620302..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi deleted file mode 100644 index c1aba246f6d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_not_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py deleted file mode 100644 index a6d59aa973d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_nul_characters_in_strings_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NUL_CHARACTERS_IN_STRINGS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py deleted file mode 100644 index 0c7f440c708..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NulCharactersInStrings - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNulCharactersInStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi deleted file mode 100644 index cbf4486797f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_nul_characters_in_strings_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings - -# body param -SchemaForRequestBodyApplicationJson = NulCharactersInStrings - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nul_characters_in_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNulCharactersInStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nul_characters_in_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py deleted file mode 100644 index c4be57a9447..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_null_type_matches_only_the_null_object_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py deleted file mode 100644 index 56b091985c6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.NoneSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi deleted file mode 100644 index 4da5c4f7002..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_null_type_matches_only_the_null_object_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.NoneSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_null_type_matches_only_the_null_object_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNullTypeMatchesOnlyTheNullObjectRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_null_type_matches_only_the_null_object_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,None, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py deleted file mode 100644 index b95a838eacb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_number_type_matches_numbers_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py deleted file mode 100644 index 1423f642119..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.NumberSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNumberTypeMatchesNumbersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi deleted file mode 100644 index ff7cb65e909..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_number_type_matches_numbers_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.NumberSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_number_type_matches_numbers_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNumberTypeMatchesNumbersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_number_type_matches_numbers_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,decimal.Decimal, int, float, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py deleted file mode 100644 index d7d33f2aef2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_object_properties_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_OBJECT_PROPERTIES_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py deleted file mode 100644 index 41241c760da..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation - - -request_body_object_properties_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_properties_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectPropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi deleted file mode 100644 index 95a3ee82309..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_properties_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation - -# body param -SchemaForRequestBodyApplicationJson = ObjectPropertiesValidation - - -request_body_object_properties_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_properties_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_object_properties_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectPropertiesValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_properties_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py deleted file mode 100644 index d125b30a97e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_object_type_matches_objects_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py deleted file mode 100644 index 911273486be..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectTypeMatchesObjectsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi deleted file mode 100644 index a044e862a33..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_object_type_matches_objects_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_type_matches_objects_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectTypeMatchesObjectsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_type_matches_objects_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py deleted file mode 100644 index 1b089b411fd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_oneof_complex_types_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ONEOF_COMPLEX_TYPES_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py deleted file mode 100644 index fe4d050911d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_complex_types import OneofComplexTypes - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = OneofComplexTypes - - -request_body_oneof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_complex_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi deleted file mode 100644 index 75c8162380c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_complex_types_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_complex_types import OneofComplexTypes - -# body param -SchemaForRequestBodyApplicationJson = OneofComplexTypes - - -request_body_oneof_complex_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_complex_types_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_complex_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofComplexTypesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_complex_types_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py deleted file mode 100644 index c19aa40ea94..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_oneof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ONEOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py deleted file mode 100644 index 43ccc249302..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof import Oneof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Oneof - - -request_body_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi deleted file mode 100644 index a97c6e2446f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof import Oneof - -# body param -SchemaForRequestBodyApplicationJson = Oneof - - -request_body_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py deleted file mode 100644 index 605ed77fbeb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_oneof_with_base_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ONEOF_WITH_BASE_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py deleted file mode 100644 index e544c6ff49e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = OneofWithBaseSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi deleted file mode 100644 index a746f7a0d76..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_base_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema - -# body param -SchemaForRequestBodyApplicationJson = OneofWithBaseSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_base_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithBaseSchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_base_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py deleted file mode 100644 index ba897616f78..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_oneof_with_empty_schema_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py deleted file mode 100644 index fdbf4b27853..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = OneofWithEmptySchema - - -request_body_oneof_with_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_with_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi deleted file mode 100644 index d8fc0e2bd0c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_empty_schema_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema - -# body param -SchemaForRequestBodyApplicationJson = OneofWithEmptySchema - - -request_body_oneof_with_empty_schema = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_empty_schema_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_with_empty_schema.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithEmptySchemaRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_empty_schema_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py deleted file mode 100644 index 748f67c50b3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_oneof_with_required_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_ONEOF_WITH_REQUIRED_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py deleted file mode 100644 index 96b14ac5e38..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_required import OneofWithRequired - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = OneofWithRequired - - -request_body_oneof_with_required = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_with_required.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithRequiredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi deleted file mode 100644 index f8aa54fb070..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_oneof_with_required_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_required import OneofWithRequired - -# body param -SchemaForRequestBodyApplicationJson = OneofWithRequired - - -request_body_oneof_with_required = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_required_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_oneof_with_required.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithRequiredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_required_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py deleted file mode 100644 index 30f8d5d82d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_pattern_is_not_anchored_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_PATTERN_IS_NOT_ANCHORED_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py deleted file mode 100644 index 61694587558..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = PatternIsNotAnchored - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternIsNotAnchoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi deleted file mode 100644 index d189f268f14..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_is_not_anchored_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored - -# body param -SchemaForRequestBodyApplicationJson = PatternIsNotAnchored - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_is_not_anchored_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternIsNotAnchoredRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_is_not_anchored_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py deleted file mode 100644 index 9f48e004c50..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_pattern_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_PATTERN_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py deleted file mode 100644 index 458054ebee2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_validation import PatternValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = PatternValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi deleted file mode 100644 index c39cf9f1a7f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_pattern_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_validation import PatternValidation - -# body param -SchemaForRequestBodyApplicationJson = PatternValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 0191726a9df..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_properties_with_escaped_characters_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py deleted file mode 100644 index 425ee3cfe0a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters - - -request_body_properties_with_escaped_characters = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_properties_with_escaped_characters.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi deleted file mode 100644 index 7b0d38f7f92..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_properties_with_escaped_characters_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters - -# body param -SchemaForRequestBodyApplicationJson = PropertiesWithEscapedCharacters - - -request_body_properties_with_escaped_characters = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_properties_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_properties_with_escaped_characters.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertiesWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_properties_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py deleted file mode 100644 index d75d1defcf2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_property_named_ref_that_is_not_a_reference_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py deleted file mode 100644 index e1358eb351b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference - - -request_body_property_named_ref_that_is_not_a_reference = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_property_named_ref_that_is_not_a_reference.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi deleted file mode 100644 index af7fa383529..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_property_named_ref_that_is_not_a_reference_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -# body param -SchemaForRequestBodyApplicationJson = PropertyNamedRefThatIsNotAReference - - -request_body_property_named_ref_that_is_not_a_reference = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_property_named_ref_that_is_not_a_reference_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_property_named_ref_that_is_not_a_reference.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertyNamedRefThatIsNotAReferenceRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_property_named_ref_that_is_not_a_reference_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py deleted file mode 100644 index 39685b68077..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_additionalproperties_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_ADDITIONALPROPERTIES_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py deleted file mode 100644 index 2b5b2534eaf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInAdditionalproperties - - -request_body_ref_in_additionalproperties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_additionalproperties.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAdditionalpropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi deleted file mode 100644 index e4ec8205ea7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_additionalproperties_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties - -# body param -SchemaForRequestBodyApplicationJson = RefInAdditionalproperties - - -request_body_ref_in_additionalproperties = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_additionalproperties_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_additionalproperties.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAdditionalpropertiesRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_additionalproperties_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py deleted file mode 100644 index 6865649fc91..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_allof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_ALLOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py deleted file mode 100644 index 490d3d5ca29..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_allof import RefInAllof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInAllof - - -request_body_ref_in_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_allof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi deleted file mode 100644 index 7a254236249..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_allof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_allof import RefInAllof - -# body param -SchemaForRequestBodyApplicationJson = RefInAllof - - -request_body_ref_in_allof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_allof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_allof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAllofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_allof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py deleted file mode 100644 index 9eff1a1046b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_anyof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_ANYOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py deleted file mode 100644 index ded6d110687..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_anyof import RefInAnyof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInAnyof - - -request_body_ref_in_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_anyof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi deleted file mode 100644 index 862064722c4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_anyof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_anyof import RefInAnyof - -# body param -SchemaForRequestBodyApplicationJson = RefInAnyof - - -request_body_ref_in_anyof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_anyof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_anyof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAnyofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_anyof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py deleted file mode 100644 index cfe5fc1bdef..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_items_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_ITEMS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py deleted file mode 100644 index 309a4968e07..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_items import RefInItems - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInItems - - -request_body_ref_in_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_items.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi deleted file mode 100644 index 0acd78196a3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_items_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_items import RefInItems - -# body param -SchemaForRequestBodyApplicationJson = RefInItems - - -request_body_ref_in_items = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_items_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_items.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInItemsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_items_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py deleted file mode 100644 index 3d3ad62339f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_not_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_NOT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py deleted file mode 100644 index 7b03f7e62f3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi deleted file mode 100644 index 58ea2df2482..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_not_request_body/post.pyi +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_not_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInNotRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_not_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py deleted file mode 100644 index 3cf7e2dfb0e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_oneof_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_ONEOF_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py deleted file mode 100644 index ded54b035d3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_oneof import RefInOneof - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInOneof - - -request_body_ref_in_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi deleted file mode 100644 index 7d6b25b5ce8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_oneof_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_oneof import RefInOneof - -# body param -SchemaForRequestBodyApplicationJson = RefInOneof - - -request_body_ref_in_oneof = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_oneof_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_oneof.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInOneofRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_oneof_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py deleted file mode 100644 index e5315940008..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_ref_in_property_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REF_IN_PROPERTY_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py deleted file mode 100644 index 609b6754493..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_property import RefInProperty - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RefInProperty - - -request_body_ref_in_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_property.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi deleted file mode 100644 index ef76cd16401..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_ref_in_property_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_property import RefInProperty - -# body param -SchemaForRequestBodyApplicationJson = RefInProperty - - -request_body_ref_in_property = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_property_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_ref_in_property.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInPropertyRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_property_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py deleted file mode 100644 index c281e13df0f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_required_default_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REQUIRED_DEFAULT_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py deleted file mode 100644 index 81fcb2360bb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_default_validation import RequiredDefaultValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RequiredDefaultValidation - - -request_body_required_default_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_default_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredDefaultValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi deleted file mode 100644 index 1547a9ddbc0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_default_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_default_validation import RequiredDefaultValidation - -# body param -SchemaForRequestBodyApplicationJson = RequiredDefaultValidation - - -request_body_required_default_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_default_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_default_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredDefaultValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_default_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py deleted file mode 100644 index 64140f0c884..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_required_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REQUIRED_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py deleted file mode 100644 index d63ce6b708c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_validation import RequiredValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RequiredValidation - - -request_body_required_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi deleted file mode 100644 index 56c39dd8953..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_validation import RequiredValidation - -# body param -SchemaForRequestBodyApplicationJson = RequiredValidation - - -request_body_required_validation = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_validation.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py deleted file mode 100644 index 2b789e16f48..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_required_with_empty_array_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py deleted file mode 100644 index 805ab2b80b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray - - -request_body_required_with_empty_array = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_with_empty_array.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEmptyArrayRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi deleted file mode 100644 index 1f2a9c1946c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_empty_array_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray - -# body param -SchemaForRequestBodyApplicationJson = RequiredWithEmptyArray - - -request_body_required_with_empty_array = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_empty_array_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_required_with_empty_array.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEmptyArrayRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_empty_array_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py deleted file mode 100644 index 84963ff8819..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_required_with_escaped_characters_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py deleted file mode 100644 index 834a8baa087..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.py +++ /dev/null @@ -1,330 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi deleted file mode 100644 index 57aef4b171c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_required_with_escaped_characters_request_body/post.pyi +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_escaped_characters_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEscapedCharactersRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_escaped_characters_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py deleted file mode 100644 index 9fbc857f5ff..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_simple_enum_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_SIMPLE_ENUM_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py deleted file mode 100644 index 5354e4de1b5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = SimpleEnumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSimpleEnumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi deleted file mode 100644 index effcdc02f2d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_simple_enum_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation - -# body param -SchemaForRequestBodyApplicationJson = SimpleEnumValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_simple_enum_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSimpleEnumValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_simple_enum_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py deleted file mode 100644 index a5975daf716..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_string_type_matches_strings_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_STRING_TYPE_MATCHES_STRINGS_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py deleted file mode 100644 index 3b4e6447496..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStringTypeMatchesStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi deleted file mode 100644 index 111d13eaddb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_string_type_matches_strings_request_body/post.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_string_type_matches_strings_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStringTypeMatchesStringsRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_string_type_matches_strings_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,str, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py deleted file mode 100644 index 19bb1f267e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py deleted file mode 100644 index 2f172ee7ea9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - - -request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi deleted file mode 100644 index 3c829415e75..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -# body param -SchemaForRequestBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - - -request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_the_default_keyword_does_not_do_anything_if_the_property_is_missing.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py deleted file mode 100644 index cfdcae95f6c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_uniqueitems_false_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py deleted file mode 100644 index 84e9b315a2b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsFalseValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi deleted file mode 100644 index 8207e18ee6f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_false_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation - -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsFalseValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_false_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsFalseValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_false_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py deleted file mode 100644 index e3afc7776c9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_uniqueitems_validation_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_UNIQUEITEMS_VALIDATION_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py deleted file mode 100644 index b8c23088f93..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi deleted file mode 100644 index e07c97b8adc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uniqueitems_validation_request_body/post.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation - -# body param -SchemaForRequestBodyApplicationJson = UniqueitemsValidation - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_validation_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsValidationRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_validation_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py deleted file mode 100644 index 8b7bbf53e8f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_uri_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_URI_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py deleted file mode 100644 index cb462b9db7c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi deleted file mode 100644 index 73a3c7ebb32..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py deleted file mode 100644 index 75781edad7c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_uri_reference_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_URI_REFERENCE_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py deleted file mode 100644 index c0dc0dbb2a8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriReferenceFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi deleted file mode 100644 index 64a2a746e02..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_reference_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_reference_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriReferenceFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_reference_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py deleted file mode 100644 index 5c3430004e2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.request_body_post_uri_template_format_request_body import Api - -from unit_test_api.paths import PathValues - -path = PathValues.REQUEST_BODY_POST_URI_TEMPLATE_FORMAT_REQUEST_BODY \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py deleted file mode 100644 index faa0919acc7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.py +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriTemplateFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi deleted file mode 100644 index c45b03a050c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/request_body_post_uri_template_format_request_body/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_template_format_request_body_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriTemplateFormatRequestBody(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_template_format_request_body( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_request_body_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py deleted file mode 100644 index 952a3a37816..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ALLOWS_ASCHEMA_WHICH_SHOULD_VALIDATE_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py deleted file mode 100644 index 70aa9f68534..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi deleted file mode 100644 index 0105fff8438..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_allows_a_schema_which_should_validate import AdditionalpropertiesAllowsASchemaWhichShouldValidate - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAllowsASchemaWhichShouldValidate - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAllowsASchemaWhichShouldValidateResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_allows_a_schema_which_should_validate_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py deleted file mode 100644 index 8ba816b84c7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_ARE_ALLOWED_BY_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py deleted file mode 100644 index 5b26f694e8f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi deleted file mode 100644 index 4401eaf87f2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_are_allowed_by_default_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_are_allowed_by_default import AdditionalpropertiesAreAllowedByDefault - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesAreAllowedByDefault - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesAreAllowedByDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_are_allowed_by_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_are_allowed_by_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py deleted file mode 100644 index 2c17dfc57e3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_CAN_EXIST_BY_ITSELF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py deleted file mode 100644 index 3bf75bed914..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi deleted file mode 100644 index 4089f55a73e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_can_exist_by_itself_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_can_exist_by_itself import AdditionalpropertiesCanExistByItself - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesCanExistByItself - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesCanExistByItselfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_can_exist_by_itself_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_can_exist_by_itself_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py deleted file mode 100644 index 91245978b9f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ADDITIONALPROPERTIES_SHOULD_NOT_LOOK_IN_APPLICATORS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py deleted file mode 100644 index 5be612e8e01..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi deleted file mode 100644 index bc87bead413..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.additionalproperties_should_not_look_in_applicators import AdditionalpropertiesShouldNotLookInApplicators - -SchemaFor200ResponseBodyApplicationJson = AdditionalpropertiesShouldNotLookInApplicators - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAdditionalpropertiesShouldNotLookInApplicatorsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_additionalproperties_should_not_look_in_applicators_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index c2954dad02b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_COMBINED_WITH_ANYOF_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py deleted file mode 100644 index 635afda0dbd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi deleted file mode 100644 index 3795a3b74b2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_combined_with_anyof_oneof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_combined_with_anyof_oneof import AllofCombinedWithAnyofOneof - -SchemaFor200ResponseBodyApplicationJson = AllofCombinedWithAnyofOneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofCombinedWithAnyofOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_combined_with_anyof_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_combined_with_anyof_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index 966421655a4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py deleted file mode 100644 index 94a447e4956..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof import Allof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = Allof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi deleted file mode 100644 index 1dc3c32a9cc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof import Allof - -SchemaFor200ResponseBodyApplicationJson = Allof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py deleted file mode 100644 index d3d3b345f62..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_simple_types_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_SIMPLE_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py deleted file mode 100644 index 5c4604d196e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_simple_types import AllofSimpleTypes - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi deleted file mode 100644 index a1396767914..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_simple_types_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_simple_types import AllofSimpleTypes - -SchemaFor200ResponseBodyApplicationJson = AllofSimpleTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_simple_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofSimpleTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_simple_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_simple_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index ead19c41027..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_with_base_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py deleted file mode 100644 index 1f0985f895b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 77da52c350d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_base_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_base_schema import AllofWithBaseSchema - -SchemaFor200ResponseBodyApplicationJson = AllofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 5b925dbe84f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_with_one_empty_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py deleted file mode 100644 index da75e06fbb1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 746593975d9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_one_empty_schema import AllofWithOneEmptySchema - -SchemaFor200ResponseBodyApplicationJson = AllofWithOneEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index d2158fd5910..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_FIRST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py deleted file mode 100644 index 48101abd1e0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 908b9e379d5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_first_empty_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_first_empty_schema import AllofWithTheFirstEmptySchema - -SchemaFor200ResponseBodyApplicationJson = AllofWithTheFirstEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheFirstEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_first_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_first_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 96db6f89d5d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_WITH_THE_LAST_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py deleted file mode 100644 index bf48f1ab291..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 8c19a4c802d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_the_last_empty_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_the_last_empty_schema import AllofWithTheLastEmptySchema - -SchemaFor200ResponseBodyApplicationJson = AllofWithTheLastEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTheLastEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_the_last_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_the_last_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py deleted file mode 100644 index fcb8c8f7ec4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_allof_with_two_empty_schemas_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ALLOF_WITH_TWO_EMPTY_SCHEMAS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py deleted file mode 100644 index ab51977650d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi deleted file mode 100644 index 19aa76ce144..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_allof_with_two_empty_schemas_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.allof_with_two_empty_schemas import AllofWithTwoEmptySchemas - -SchemaFor200ResponseBodyApplicationJson = AllofWithTwoEmptySchemas - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAllofWithTwoEmptySchemasResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_allof_with_two_empty_schemas_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_allof_with_two_empty_schemas_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index b028f3bec7c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_anyof_complex_types_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ANYOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py deleted file mode 100644 index ce0cb06e73b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi deleted file mode 100644 index 3587d554fa0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_complex_types_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_complex_types import AnyofComplexTypes - -SchemaFor200ResponseBodyApplicationJson = AnyofComplexTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index de1893c9ea8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_anyof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py deleted file mode 100644 index a9550fa4ef7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof import Anyof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = Anyof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi deleted file mode 100644 index 01a0cc7ab6a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof import Anyof - -SchemaFor200ResponseBodyApplicationJson = Anyof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index bbb82f9ffcb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_anyof_with_base_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ANYOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py deleted file mode 100644 index 1dee133da93..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index e5da7323ab6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_base_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_base_schema import AnyofWithBaseSchema - -SchemaFor200ResponseBodyApplicationJson = AnyofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index ceb7349121d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_anyof_with_one_empty_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ANYOF_WITH_ONE_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py deleted file mode 100644 index 8bc44fe0935..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index d21ca9bc8db..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_anyof_with_one_empty_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.anyof_with_one_empty_schema import AnyofWithOneEmptySchema - -SchemaFor200ResponseBodyApplicationJson = AnyofWithOneEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostAnyofWithOneEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_anyof_with_one_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_anyof_with_one_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py deleted file mode 100644 index 2fdd3453b97..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_array_type_matches_arrays_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ARRAY_TYPE_MATCHES_ARRAYS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py deleted file mode 100644 index 139e56b4a53..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays - -from . import path - -SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi deleted file mode 100644 index 8747581c8ab..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_array_type_matches_arrays_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.array_type_matches_arrays import ArrayTypeMatchesArrays - -SchemaFor200ResponseBodyApplicationJson = ArrayTypeMatchesArrays - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_array_type_matches_arrays_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostArrayTypeMatchesArraysResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_array_type_matches_arrays_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_array_type_matches_arrays_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py deleted file mode 100644 index bb12060f2d4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_boolean_type_matches_booleans_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_BOOLEAN_TYPE_MATCHES_BOOLEANS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py deleted file mode 100644 index 8925a2f124c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi deleted file mode 100644 index a18f80d294e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_boolean_type_matches_booleans_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBooleanTypeMatchesBooleansResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_boolean_type_matches_booleans_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_boolean_type_matches_booleans_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py deleted file mode 100644 index 65dc15fb389..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_by_int_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_BY_INT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py deleted file mode 100644 index 6db4c98f076..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_int import ByInt - -from . import path - -SchemaFor200ResponseBodyApplicationJson = ByInt - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByIntResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi deleted file mode 100644 index 86ce25c36b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_int_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_int import ByInt - -SchemaFor200ResponseBodyApplicationJson = ByInt - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_int_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByIntResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_int_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_int_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py deleted file mode 100644 index c4a2ebe9634..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_by_number_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_BY_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py deleted file mode 100644 index 74a44f78f2e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_number import ByNumber - -from . import path - -SchemaFor200ResponseBodyApplicationJson = ByNumber - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi deleted file mode 100644 index 262254f8eae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_number_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_number import ByNumber - -SchemaFor200ResponseBodyApplicationJson = ByNumber - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostByNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py deleted file mode 100644 index 8006bf48849..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_by_small_number_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_BY_SMALL_NUMBER_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py deleted file mode 100644 index 07beaaff033..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_small_number import BySmallNumber - -from . import path - -SchemaFor200ResponseBodyApplicationJson = BySmallNumber - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBySmallNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi deleted file mode 100644 index 885313a3343..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_by_small_number_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.by_small_number import BySmallNumber - -SchemaFor200ResponseBodyApplicationJson = BySmallNumber - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_by_small_number_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostBySmallNumberResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_by_small_number_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_by_small_number_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py deleted file mode 100644 index da7708ad056..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_date_time_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_DATE_TIME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py deleted file mode 100644 index 548965b1387..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,259 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 865b451de20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_date_time_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DateTimeBase, - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_date_time_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostDateTimeFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_date_time_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_date_time_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 0946a580d73..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_email_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_EMAIL_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py deleted file mode 100644 index ee286e283b7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEmailFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 5c95b257433..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_email_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'email' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_email_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEmailFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_email_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_email_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py deleted file mode 100644 index 974d688885b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enum_with0_does_not_match_false_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUM_WITH0DOES_NOT_MATCH_FALSE_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py deleted file mode 100644 index 1f6ca70ec90..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi deleted file mode 100644 index 606fa10bf1e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with0_does_not_match_false_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with0_does_not_match_false import EnumWith0DoesNotMatchFalse - -SchemaFor200ResponseBodyApplicationJson = EnumWith0DoesNotMatchFalse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith0DoesNotMatchFalseResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with0_does_not_match_false_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with0_does_not_match_false_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py deleted file mode 100644 index 2234fa84bfb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enum_with1_does_not_match_true_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUM_WITH1DOES_NOT_MATCH_TRUE_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py deleted file mode 100644 index c19285a5e6d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi deleted file mode 100644 index 84b4d6043b4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with1_does_not_match_true_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with1_does_not_match_true import EnumWith1DoesNotMatchTrue - -SchemaFor200ResponseBodyApplicationJson = EnumWith1DoesNotMatchTrue - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWith1DoesNotMatchTrueResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with1_does_not_match_true_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with1_does_not_match_true_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 29277c539a0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enum_with_escaped_characters_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUM_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py deleted file mode 100644 index 017e5021399..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi deleted file mode 100644 index 7c3a996d642..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_escaped_characters_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_escaped_characters import EnumWithEscapedCharacters - -SchemaFor200ResponseBodyApplicationJson = EnumWithEscapedCharacters - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py deleted file mode 100644 index 754d48ea264..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enum_with_false_does_not_match0_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUM_WITH_FALSE_DOES_NOT_MATCH0RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py deleted file mode 100644 index b3b63b493d2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi deleted file mode 100644 index 01289282a0e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_false_does_not_match0_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_false_does_not_match0 import EnumWithFalseDoesNotMatch0 - -SchemaFor200ResponseBodyApplicationJson = EnumWithFalseDoesNotMatch0 - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithFalseDoesNotMatch0ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_false_does_not_match0_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_false_does_not_match0_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py deleted file mode 100644 index 49e7a0e7899..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enum_with_true_does_not_match1_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUM_WITH_TRUE_DOES_NOT_MATCH1RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py deleted file mode 100644 index b70e8aa05e8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi deleted file mode 100644 index ad1aa82192f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enum_with_true_does_not_match1_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enum_with_true_does_not_match1 import EnumWithTrueDoesNotMatch1 - -SchemaFor200ResponseBodyApplicationJson = EnumWithTrueDoesNotMatch1 - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumWithTrueDoesNotMatch1ResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enum_with_true_does_not_match1_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enum_with_true_does_not_match1_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py deleted file mode 100644 index 9b16fee8d8a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_enums_in_properties_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ENUMS_IN_PROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py deleted file mode 100644 index c8e117992eb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enums_in_properties import EnumsInProperties - -from . import path - -SchemaFor200ResponseBodyApplicationJson = EnumsInProperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi deleted file mode 100644 index 7eec1429ac4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_enums_in_properties_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.enums_in_properties import EnumsInProperties - -SchemaFor200ResponseBodyApplicationJson = EnumsInProperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_enums_in_properties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostEnumsInPropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_enums_in_properties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_enums_in_properties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py deleted file mode 100644 index 2aa3240b7b8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_forbidden_property_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_FORBIDDEN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py deleted file mode 100644 index 5a8d448e356..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.forbidden_property import ForbiddenProperty - -from . import path - -SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi deleted file mode 100644 index b6001e78d20..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_forbidden_property_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.forbidden_property import ForbiddenProperty - -SchemaFor200ResponseBodyApplicationJson = ForbiddenProperty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_forbidden_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostForbiddenPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_forbidden_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_forbidden_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py deleted file mode 100644 index fda9b15ffc9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_hostname_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_HOSTNAME_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py deleted file mode 100644 index 43a5c9f81aa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostHostnameFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 1fe8282ca02..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_hostname_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'hostname' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_hostname_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostHostnameFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_hostname_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_hostname_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py deleted file mode 100644 index cc00a644c93..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_integer_type_matches_integers_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_INTEGER_TYPE_MATCHES_INTEGERS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py deleted file mode 100644 index 3b2afaaedf0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi deleted file mode 100644 index 87225adca5e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_integer_type_matches_integers_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.IntSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_integer_type_matches_integers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIntegerTypeMatchesIntegersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_integer_type_matches_integers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_integer_type_matches_integers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py deleted file mode 100644 index 511449f6622..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_INVALID_INSTANCE_SHOULD_NOT_RAISE_ERROR_WHEN_FLOAT_DIVISION_INF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py deleted file mode 100644 index 1d4c9093414..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -from . import path - -SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi deleted file mode 100644 index a35b8e66278..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_instance_should_not_raise_error_when_float_division_inf import InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - -SchemaFor200ResponseBodyApplicationJson = InvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInf - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidInstanceShouldNotRaiseErrorWhenFloatDivisionInfResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_instance_should_not_raise_error_when_float_division_inf_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py deleted file mode 100644 index fb4cadd1165..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_invalid_string_value_for_default_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_INVALID_STRING_VALUE_FOR_DEFAULT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py deleted file mode 100644 index 578b5d1f05a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault - -from . import path - -SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi deleted file mode 100644 index b177c7f62b1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_invalid_string_value_for_default_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.invalid_string_value_for_default import InvalidStringValueForDefault - -SchemaFor200ResponseBodyApplicationJson = InvalidStringValueForDefault - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_invalid_string_value_for_default_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostInvalidStringValueForDefaultResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_invalid_string_value_for_default_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_invalid_string_value_for_default_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 1b7b9c3555a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ipv4_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_IPV4FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py deleted file mode 100644 index 30d1288b479..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv4FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 0876cdbf06d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv4_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv4' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv4_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv4FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv4_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv4_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py deleted file mode 100644 index a1919a789e2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ipv6_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_IPV6FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py deleted file mode 100644 index 48b02e2d7fa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv6FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi deleted file mode 100644 index c1f2332964e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ipv6_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'ipv6' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ipv6_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostIpv6FormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ipv6_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ipv6_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py deleted file mode 100644 index bd56842c09a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_json_pointer_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_JSON_POINTER_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py deleted file mode 100644 index cbe7a00b23c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 6a636be3f3e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_json_pointer_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'json-pointer' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_json_pointer_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostJsonPointerFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_json_pointer_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_json_pointer_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 0a37153cc0b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maximum_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py deleted file mode 100644 index b7afe034720..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation import MaximumValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MaximumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index c4661e8ea07..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation import MaximumValidation - -SchemaFor200ResponseBodyApplicationJson = MaximumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index eb036d358c4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXIMUM_VALIDATION_WITH_UNSIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py deleted file mode 100644 index 621037fbb6f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi deleted file mode 100644 index 925fb61c8ea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maximum_validation_with_unsigned_integer_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maximum_validation_with_unsigned_integer import MaximumValidationWithUnsignedInteger - -SchemaFor200ResponseBodyApplicationJson = MaximumValidationWithUnsignedInteger - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaximumValidationWithUnsignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maximum_validation_with_unsigned_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maximum_validation_with_unsigned_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 7c0b46d8d73..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maxitems_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py deleted file mode 100644 index e8e3ac4607c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxitems_validation import MaxitemsValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index b4f0f78c742..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxitems_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxitems_validation import MaxitemsValidation - -SchemaFor200ResponseBodyApplicationJson = MaxitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 0fe9a95208b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maxlength_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py deleted file mode 100644 index eba71da226d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxlength_validation import MaxlengthValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index ca09d8bde8b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxlength_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxlength_validation import MaxlengthValidation - -SchemaFor200ResponseBodyApplicationJson = MaxlengthValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py deleted file mode 100644 index 109f64b15b3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXPROPERTIES0MEANS_THE_OBJECT_IS_EMPTY_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py deleted file mode 100644 index 2cc7df09dd4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty - -from . import path - -SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi deleted file mode 100644 index 7813699de15..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties0_means_the_object_is_empty_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties0_means_the_object_is_empty import Maxproperties0MeansTheObjectIsEmpty - -SchemaFor200ResponseBodyApplicationJson = Maxproperties0MeansTheObjectIsEmpty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxproperties0MeansTheObjectIsEmptyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties0_means_the_object_is_empty_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties0_means_the_object_is_empty_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 4331ff3b54a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_maxproperties_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MAXPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py deleted file mode 100644 index 72f32e20741..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index f24ddb8e32b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_maxproperties_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.maxproperties_validation import MaxpropertiesValidation - -SchemaFor200ResponseBodyApplicationJson = MaxpropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_maxproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMaxpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_maxproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_maxproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index ddb4f8db270..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_minimum_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py deleted file mode 100644 index f290947d7e9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation import MinimumValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MinimumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 82b2ad07cff..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation import MinimumValidation - -SchemaFor200ResponseBodyApplicationJson = MinimumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py deleted file mode 100644 index 3b5de8d2111..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MINIMUM_VALIDATION_WITH_SIGNED_INTEGER_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py deleted file mode 100644 index ca57d31936d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi deleted file mode 100644 index 9c9006b70eb..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minimum_validation_with_signed_integer_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minimum_validation_with_signed_integer import MinimumValidationWithSignedInteger - -SchemaFor200ResponseBodyApplicationJson = MinimumValidationWithSignedInteger - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinimumValidationWithSignedIntegerResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minimum_validation_with_signed_integer_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minimum_validation_with_signed_integer_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 243d71070cd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_minitems_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MINITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py deleted file mode 100644 index 3d50fd67c37..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minitems_validation import MinitemsValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MinitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 78ae9660ddd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minitems_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minitems_validation import MinitemsValidation - -SchemaFor200ResponseBodyApplicationJson = MinitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index ee102e9b975..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_minlength_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MINLENGTH_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py deleted file mode 100644 index 7f54aa35a87..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minlength_validation import MinlengthValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MinlengthValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 5686f4bc8fc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minlength_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minlength_validation import MinlengthValidation - -SchemaFor200ResponseBodyApplicationJson = MinlengthValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minlength_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinlengthValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minlength_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minlength_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 43828ac6ee4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_minproperties_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_MINPROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py deleted file mode 100644 index 7cae7fac748..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minproperties_validation import MinpropertiesValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index a8a5fed8e26..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_minproperties_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.minproperties_validation import MinpropertiesValidation - -SchemaFor200ResponseBodyApplicationJson = MinpropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_minproperties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostMinpropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_minproperties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_minproperties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index d5438b625bc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NESTED_ALLOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py deleted file mode 100644 index 36122b5c781..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics - -from . import path - -SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi deleted file mode 100644 index a7e9a3b1b68..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_allof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_allof_to_check_validation_semantics import NestedAllofToCheckValidationSemantics - -SchemaFor200ResponseBodyApplicationJson = NestedAllofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAllofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_allof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_allof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index e8b0c6f26ee..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NESTED_ANYOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py deleted file mode 100644 index 8cb87ce5d8c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics - -from . import path - -SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi deleted file mode 100644 index a1774aa0880..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_anyof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_anyof_to_check_validation_semantics import NestedAnyofToCheckValidationSemantics - -SchemaFor200ResponseBodyApplicationJson = NestedAnyofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedAnyofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_anyof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_anyof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 9c307628311..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_nested_items_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NESTED_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py deleted file mode 100644 index e1b615ef075..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_items import NestedItems - -from . import path - -SchemaFor200ResponseBodyApplicationJson = NestedItems - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi deleted file mode 100644 index 22c26ae93dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_items_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_items import NestedItems - -SchemaFor200ResponseBodyApplicationJson = NestedItems - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py deleted file mode 100644 index 3db488be784..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NESTED_ONEOF_TO_CHECK_VALIDATION_SEMANTICS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py deleted file mode 100644 index a489b9f4ff7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics - -from . import path - -SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi deleted file mode 100644 index da59ed9b9dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nested_oneof_to_check_validation_semantics_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nested_oneof_to_check_validation_semantics import NestedOneofToCheckValidationSemantics - -SchemaFor200ResponseBodyApplicationJson = NestedOneofToCheckValidationSemantics - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNestedOneofToCheckValidationSemanticsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nested_oneof_to_check_validation_semantics_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nested_oneof_to_check_validation_semantics_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 8af95c890e7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_not_more_complex_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NOT_MORE_COMPLEX_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py deleted file mode 100644 index 3f43f74ce9a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,307 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 0e570fd9572..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_more_complex_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class not_schema( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - foo = schemas.StrSchema - __annotations__ = { - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'not_schema': - return super().__new__( - cls, - *_args, - foo=foo, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_more_complex_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotMoreComplexSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_more_complex_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_more_complex_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py deleted file mode 100644 index e832b365dd1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_not_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py deleted file mode 100644 index 6a3c5ee94cd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi deleted file mode 100644 index dbe29a8e4b9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_not_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - not_schema = schemas.IntSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index f91e082d1fe..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_nul_characters_in_strings_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NUL_CHARACTERS_IN_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py deleted file mode 100644 index cabfa961dcf..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings - -from . import path - -SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi deleted file mode 100644 index 97eb1a58520..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_nul_characters_in_strings_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.nul_characters_in_strings import NulCharactersInStrings - -SchemaFor200ResponseBodyApplicationJson = NulCharactersInStrings - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_nul_characters_in_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNulCharactersInStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_nul_characters_in_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_nul_characters_in_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py deleted file mode 100644 index bc488406d9d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NULL_TYPE_MATCHES_ONLY_THE_NULL_OBJECT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py deleted file mode 100644 index db6c8211097..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.NoneSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi deleted file mode 100644 index c2210cb8d2a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_null_type_matches_only_the_null_object_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.NoneSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNullTypeMatchesOnlyTheNullObjectResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_null_type_matches_only_the_null_object_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_null_type_matches_only_the_null_object_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py deleted file mode 100644 index 77109139f3e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_number_type_matches_numbers_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_NUMBER_TYPE_MATCHES_NUMBERS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py deleted file mode 100644 index d0da0ee8b64..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.NumberSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi deleted file mode 100644 index 565ddc34dac..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_number_type_matches_numbers_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.NumberSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_number_type_matches_numbers_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostNumberTypeMatchesNumbersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_number_type_matches_numbers_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_number_type_matches_numbers_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index b2c02e85caa..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_object_properties_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_OBJECT_PROPERTIES_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py deleted file mode 100644 index da2f6840076..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 3da213a42b6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_properties_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.object_properties_validation import ObjectPropertiesValidation - -SchemaFor200ResponseBodyApplicationJson = ObjectPropertiesValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_properties_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectPropertiesValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_properties_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_properties_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py deleted file mode 100644 index c069354cd1c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_object_type_matches_objects_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_OBJECT_TYPE_MATCHES_OBJECTS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py deleted file mode 100644 index 7a6f898ee41..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi deleted file mode 100644 index 8d95e32fcc3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_object_type_matches_objects_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_object_type_matches_objects_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostObjectTypeMatchesObjectsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_object_type_matches_objects_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_object_type_matches_objects_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py deleted file mode 100644 index 2003410c48f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_oneof_complex_types_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ONEOF_COMPLEX_TYPES_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py deleted file mode 100644 index ba686b0553d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_complex_types import OneofComplexTypes - -from . import path - -SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi deleted file mode 100644 index fb610e25012..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_complex_types_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_complex_types import OneofComplexTypes - -SchemaFor200ResponseBodyApplicationJson = OneofComplexTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_complex_types_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofComplexTypesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_complex_types_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_complex_types_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 5b88a1224f2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_oneof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py deleted file mode 100644 index 1e8d017506b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof import Oneof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = Oneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi deleted file mode 100644 index b0b3436cf59..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof import Oneof - -SchemaFor200ResponseBodyApplicationJson = Oneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 075773cc7ea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_oneof_with_base_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ONEOF_WITH_BASE_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py deleted file mode 100644 index 01364c47bae..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 88cefca69e1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_base_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_base_schema import OneofWithBaseSchema - -SchemaFor200ResponseBodyApplicationJson = OneofWithBaseSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_base_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithBaseSchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_base_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_base_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py deleted file mode 100644 index 7640477c2f0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_oneof_with_empty_schema_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ONEOF_WITH_EMPTY_SCHEMA_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py deleted file mode 100644 index cd618b49b30..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema - -from . import path - -SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi deleted file mode 100644 index 083ceeaa186..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_empty_schema_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_empty_schema import OneofWithEmptySchema - -SchemaFor200ResponseBodyApplicationJson = OneofWithEmptySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_empty_schema_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithEmptySchemaResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_empty_schema_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_empty_schema_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py deleted file mode 100644 index 1439a56296e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_oneof_with_required_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_ONEOF_WITH_REQUIRED_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py deleted file mode 100644 index c6d42872827..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_required import OneofWithRequired - -from . import path - -SchemaFor200ResponseBodyApplicationJson = OneofWithRequired - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi deleted file mode 100644 index 07c8ce0bca0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_oneof_with_required_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.oneof_with_required import OneofWithRequired - -SchemaFor200ResponseBodyApplicationJson = OneofWithRequired - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_oneof_with_required_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostOneofWithRequiredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_oneof_with_required_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_oneof_with_required_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py deleted file mode 100644 index f1ac8646a88..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_pattern_is_not_anchored_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_PATTERN_IS_NOT_ANCHORED_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py deleted file mode 100644 index 9d866d09c68..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored - -from . import path - -SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi deleted file mode 100644 index ddf370ce1ca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_is_not_anchored_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_is_not_anchored import PatternIsNotAnchored - -SchemaFor200ResponseBodyApplicationJson = PatternIsNotAnchored - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_is_not_anchored_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternIsNotAnchoredResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_is_not_anchored_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_is_not_anchored_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 3789f6ceca7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_pattern_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_PATTERN_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py deleted file mode 100644 index b57bb80d050..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_validation import PatternValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = PatternValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 1cf08e265c2..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_pattern_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.pattern_validation import PatternValidation - -SchemaFor200ResponseBodyApplicationJson = PatternValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_pattern_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPatternValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_pattern_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_pattern_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index 9aaa4005c48..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_properties_with_escaped_characters_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_PROPERTIES_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py deleted file mode 100644 index ec8ead79772..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters - -from . import path - -SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi deleted file mode 100644 index 8ba842de248..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_properties_with_escaped_characters_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.properties_with_escaped_characters import PropertiesWithEscapedCharacters - -SchemaFor200ResponseBodyApplicationJson = PropertiesWithEscapedCharacters - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_properties_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertiesWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_properties_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_properties_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py deleted file mode 100644 index 424bb192e45..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_PROPERTY_NAMED_REF_THAT_IS_NOT_AREFERENCE_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py deleted file mode 100644 index 0bc30e9f40d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -from . import path - -SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi deleted file mode 100644 index ae3b5d35ea0..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_property_named_ref_that_is_not_a_reference_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -SchemaFor200ResponseBodyApplicationJson = PropertyNamedRefThatIsNotAReference - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostPropertyNamedRefThatIsNotAReferenceResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_property_named_ref_that_is_not_a_reference_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_property_named_ref_that_is_not_a_reference_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py deleted file mode 100644 index af2e8f8096e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_additionalproperties_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_ADDITIONALPROPERTIES_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py deleted file mode 100644 index 3977e5c7a67..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi deleted file mode 100644 index 47b877c7265..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_additionalproperties_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_additionalproperties import RefInAdditionalproperties - -SchemaFor200ResponseBodyApplicationJson = RefInAdditionalproperties - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_additionalproperties_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAdditionalpropertiesResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_additionalproperties_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_additionalproperties_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py deleted file mode 100644 index 2aff994d8f8..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_allof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_ALLOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py deleted file mode 100644 index 44daed19b53..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_allof import RefInAllof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInAllof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi deleted file mode 100644 index d1c63f5d24b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_allof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_allof import RefInAllof - -SchemaFor200ResponseBodyApplicationJson = RefInAllof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_allof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAllofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_allof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_allof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py deleted file mode 100644 index 662467ec6dd..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_anyof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_ANYOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py deleted file mode 100644 index 251abc4156c..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_anyof import RefInAnyof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInAnyof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi deleted file mode 100644 index 8cd1b4fc063..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_anyof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_anyof import RefInAnyof - -SchemaFor200ResponseBodyApplicationJson = RefInAnyof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_anyof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInAnyofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_anyof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_anyof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py deleted file mode 100644 index 5f4fef45816..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_items_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_ITEMS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py deleted file mode 100644 index 86efdb62556..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_items import RefInItems - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInItems - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi deleted file mode 100644 index 2dab7883e37..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_items_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_items import RefInItems - -SchemaFor200ResponseBodyApplicationJson = RefInItems - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_items_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInItemsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_items_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_items_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py deleted file mode 100644 index 81c335c672f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_not_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_NOT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py deleted file mode 100644 index 02d7ded6679..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi deleted file mode 100644 index 4583198739a..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_not_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.property_named_ref_that_is_not_a_reference import PropertyNamedRefThatIsNotAReference - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - @staticmethod - def not_schema() -> typing.Type['PropertyNamedRefThatIsNotAReference']: - return PropertyNamedRefThatIsNotAReference - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_not_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInNotResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_not_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_not_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py deleted file mode 100644 index 40113e93f25..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_oneof_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_ONEOF_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py deleted file mode 100644 index 8e41ae0ac32..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_oneof import RefInOneof - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInOneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi deleted file mode 100644 index 17d53c1870f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_oneof_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_oneof import RefInOneof - -SchemaFor200ResponseBodyApplicationJson = RefInOneof - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_oneof_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInOneofResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_oneof_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_oneof_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py deleted file mode 100644 index 46badf3657d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_ref_in_property_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REF_IN_PROPERTY_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py deleted file mode 100644 index 0bd6aa8eee7..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_property import RefInProperty - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RefInProperty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi deleted file mode 100644 index 8c5ad980063..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_ref_in_property_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.ref_in_property import RefInProperty - -SchemaFor200ResponseBodyApplicationJson = RefInProperty - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_ref_in_property_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRefInPropertyResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_ref_in_property_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_ref_in_property_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 5d1b90f2672..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_required_default_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REQUIRED_DEFAULT_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py deleted file mode 100644 index 2f004f5dd0e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_default_validation import RequiredDefaultValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index c1bef2edb94..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_default_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_default_validation import RequiredDefaultValidation - -SchemaFor200ResponseBodyApplicationJson = RequiredDefaultValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_default_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredDefaultValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_default_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_default_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index b17c030e827..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_required_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REQUIRED_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py deleted file mode 100644 index f93165b3247..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_validation import RequiredValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RequiredValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 3ca538228c9..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_validation import RequiredValidation - -SchemaFor200ResponseBodyApplicationJson = RequiredValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py deleted file mode 100644 index a890c56e6ec..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_required_with_empty_array_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_EMPTY_ARRAY_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py deleted file mode 100644 index 5d0c96f7a3f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray - -from . import path - -SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi deleted file mode 100644 index 007808a372e..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_empty_array_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.required_with_empty_array import RequiredWithEmptyArray - -SchemaFor200ResponseBodyApplicationJson = RequiredWithEmptyArray - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_empty_array_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEmptyArrayResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_empty_array_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_empty_array_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py deleted file mode 100644 index b9fb929544f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_required_with_escaped_characters_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_REQUIRED_WITH_ESCAPED_CHARACTERS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py deleted file mode 100644 index f85c67a6312..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.py +++ /dev/null @@ -1,266 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi deleted file mode 100644 index 1325cdbe859..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_required_with_escaped_characters_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,261 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - required = { - "foo\"bar", - "foo\nbar", - "foo\fbar", - "foo\tbar", - "foo\rbar", - "foo\\bar", - } - - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_required_with_escaped_characters_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostRequiredWithEscapedCharactersResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_required_with_escaped_characters_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_required_with_escaped_characters_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 5434927f1ff..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_simple_enum_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_SIMPLE_ENUM_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py deleted file mode 100644 index 65e29f541ca..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 4b580ac35fc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_simple_enum_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.simple_enum_validation import SimpleEnumValidation - -SchemaFor200ResponseBodyApplicationJson = SimpleEnumValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_simple_enum_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostSimpleEnumValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_simple_enum_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_simple_enum_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py deleted file mode 100644 index 0e9991d012d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_string_type_matches_strings_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_STRING_TYPE_MATCHES_STRINGS_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py deleted file mode 100644 index a5453c23391..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.py +++ /dev/null @@ -1,236 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi deleted file mode 100644 index 739044826e4..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_string_type_matches_strings_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,231 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_string_type_matches_strings_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostStringTypeMatchesStringsResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_string_type_matches_strings_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_string_type_matches_strings_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py deleted file mode 100644 index ec8ccdc38e5..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_THE_DEFAULT_KEYWORD_DOES_NOT_DO_ANYTHING_IF_THE_PROPERTY_IS_MISSING_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py deleted file mode 100644 index b526e4e77a6..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -from . import path - -SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi deleted file mode 100644 index 15ccfbb0425..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.the_default_keyword_does_not_do_anything_if_the_property_is_missing import TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - -SchemaFor200ResponseBodyApplicationJson = TheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissing - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostTheDefaultKeywordDoesNotDoAnythingIfThePropertyIsMissingResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_the_default_keyword_does_not_do_anything_if_the_property_is_missing_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index f40589c90cc..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_uniqueitems_false_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_FALSE_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py deleted file mode 100644 index 172961d6b1f..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index c96643d3387..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_false_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_false_validation import UniqueitemsFalseValidation - -SchemaFor200ResponseBodyApplicationJson = UniqueitemsFalseValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_false_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsFalseValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_false_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_false_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py deleted file mode 100644 index 693706fd005..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_uniqueitems_validation_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_UNIQUEITEMS_VALIDATION_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py deleted file mode 100644 index 2fd7618958b..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation - -from . import path - -SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi deleted file mode 100644 index 85f01ffb123..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uniqueitems_validation_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from unit_test_api.model.uniqueitems_validation import UniqueitemsValidation - -SchemaFor200ResponseBodyApplicationJson = UniqueitemsValidation - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uniqueitems_validation_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUniqueitemsValidationResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uniqueitems_validation_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uniqueitems_validation_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py deleted file mode 100644 index d7621b58329..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_uri_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_URI_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py deleted file mode 100644 index cd654cf4f65..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 23e328ef8ad..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py deleted file mode 100644 index dd5c4ffc435..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_uri_reference_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_URI_REFERENCE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py deleted file mode 100644 index e42b15bd714..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 636bf07c55d..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_reference_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-reference' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_reference_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriReferenceFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_reference_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_reference_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py deleted file mode 100644 index 468a1c4cfd3..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from unit_test_api.paths.response_body_post_uri_template_format_response_body_for_content_types import Api - -from unit_test_api.paths import PathValues - -path = PathValues.RESPONSE_BODY_POST_URI_TEMPLATE_FORMAT_RESPONSE_BODY_FOR_CONTENT_TYPES \ No newline at end of file diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py deleted file mode 100644 index 7fe2ce2c2f1..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - -from . import path - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi deleted file mode 100644 index 1e4b98b1558..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/paths/response_body_post_uri_template_format_response_body_for_content_types/post.pyi +++ /dev/null @@ -1,253 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from unit_test_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.AnyTypeSchema, -): - - - class MetaOapg: - format = 'uri-template' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _post_uri_template_format_response_body_for_content_types_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PostUriTemplateFormatResponseBodyForContentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @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, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post_uri_template_format_response_body_for_content_types( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._post_uri_template_format_response_body_for_content_types_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/rest.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/rest.py deleted file mode 100644 index 9b91d96a8ea..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/rest.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from unit_test_api.exceptions import ApiException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - fields = fields or {} - headers = headers or {} - - if timeout: - if isinstance(timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - fields=fields, - encode_multipart=False, - preload_content=not stream, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py b/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py deleted file mode 100644 index ce7d7eaf827..00000000000 --- a/samples/openapi3/client/3_0_3_unit_test/python/unit_test_api/schemas.py +++ /dev/null @@ -1,2475 +0,0 @@ -# coding: utf-8 - -""" - openapi 3.0.3 sample spec - - sample spec for testing openapi functionality, built from json schema tests for draft6 # noqa: E501 - - The version of the OpenAPI document: 0.0.1 - Generated by: https://openapi-generator.tech -""" - -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools -import decimal -import io -import re -import types -import typing -import uuid - -from dateutil.parser.isoparser import isoparser, _takes_ascii -import frozendict - -from unit_test_api.exceptions import ( - ApiTypeError, - ApiValueError, -) -from unit_test_api.configuration import ( - Configuration, -) - - -class Unset(object): - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset = Unset() - -none_type = type(None) -file_type = io.IOBase - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(_arg, (io.FileIO, io.BufferedReader)): - if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') - _arg.close() - inst = super(FileIO, cls).__new__(cls, _arg.name) - super(FileIO, inst).__init__(_arg.name) - return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') - - def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): - pass - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is defaultdict(set) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k] = d[k] | v - - -class ValidationMetadata(frozendict.frozendict): - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - def __new__( - cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), - from_server: bool = False, - configuration: typing.Optional[Configuration] = None, - seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() - ): - """ - Args: - path_to_item: the path to the current data being instantiated. - For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) - This changes from location to location - from_server: whether or not this data came form the server - True when receiving server data - False when instantiating model with client side data not form the server - This does not change from location to location - configuration: the Configuration instance to use - This is needed because in Configuration: - - one can disable validation checking - This does not change from location to location - seen_classes: when deserializing data that matches multiple schemas, this is used to store - the schemas that have been traversed. This is used to stop processing when a cycle is seen. - This changes from location to location - validated_path_to_schemas: stores the already validated schema classes for a given path location - This does not change from location to location - """ - return super().__new__( - cls, - path_to_item=path_to_item, - from_server=from_server, - configuration=configuration, - seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas - ) - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) - validation_ran_earlier = validated_schemas and cls in validated_schemas - if validation_ran_earlier: - return True - if cls in self.seen_classes: - return True - return False - - @property - def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') - - @property - def from_server(self) -> bool: - return self.get('from_server') - - @property - def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') - - @property - def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') - - @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -class Singleton: - """ - Enums and singletons are the same - The same instance is returned for a given key of (cls, _arg) - """ - _instances = {} - - def __new__(cls, _arg: typing.Any, **kwargs): - """ - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, _arg, str(_arg)) - if key not in cls._instances: - if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): - inst = super().__new__(cls) - cls._instances[key] = inst - else: - cls._instances[key] = super().__new__(cls, _arg) - return cls._instances[key] - - def __repr__(self): - if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' - elif isinstance(self, BoolClass): - if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' - - -class classproperty: - - def __init__(self, fget): - self.fget = fget - - def __get__(self, owner_self, owner_cls): - return self.fget(owner_cls) - - -class NoneClass(Singleton): - @classproperty - def NONE(cls): - return cls(None) - - def __bool__(self) -> bool: - return False - - -class BoolClass(Singleton): - @classproperty - def TRUE(cls): - return cls(True) - - @classproperty - def FALSE(cls): - return cls(False) - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -class MetaOapgTyped: - exclusive_maximum: typing.Union[int, float] - inclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - max_items: int - min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - - - class properties: - # to hold object properties - pass - - additional_properties: typing.Optional[typing.Type['Schema']] - max_properties: int - min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] - max_length: int - min_length: int - items: typing.Type['Schema'] - - -class Schema: - """ - the base class of all swagger/openapi schemas/models - """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} - _types: typing.Set[typing.Type] - MetaOapg = MetaOapgTyped - - @staticmethod - def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: - if isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - return item_cls - - @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - @classmethod - def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): - error_msg = cls.__type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - Schema _validate_oapg - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - - Returns: - path_to_schemas: a map of path to schemas - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - base_class = type(arg) - if base_class not in cls._types: - raise cls.__get_type_error( - arg, - validation_metadata.path_to_item, - cls._types, - key_type=False, - ) - - path_to_schemas = {validation_metadata.path_to_item: set()} - path_to_schemas[validation_metadata.path_to_item].add(cls) - path_to_schemas[validation_metadata.path_to_item].add(base_class) - return path_to_schemas - - @staticmethod - def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] - ): - """ - Processes and mutates schema_classes - If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included - """ - if len(schema_classes) < 2: - return - if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: - schema_classes.remove(UnsetAnyTypeSchema) - x_schema = schema_type_classes & schema_classes - if not x_schema: - return - x_schema = x_schema.pop() - if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): - # needed to not have a mro error in get_new_class - schema_classes.remove(x_schema) - - @classmethod - def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: - """ - Make a new dynamic class and return an instance of that class - We are making an instance of cls, but instead of making cls - make a new class, new_cls - which includes dynamic bases including cls - return an instance of that new class - - Dict property + List Item Assignment Use cases: - 1. value is NOT an instance of the required schema class - the value is validated by _validate_oapg - _validate_oapg returns a key value pair - where the key is the path to the item, and the value will be the required manufactured class - made out of the matching schemas - 2. value is an instance of the correct schema type - the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type - for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas - and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned - because value is of the correct type, and validation was run earlier when the instance was created - """ - _path_to_schemas = {} - if validation_metadata.validation_ran_earlier(cls): - add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas = {} - for path, schema_classes in _path_to_schemas.items(): - """ - Use cases - 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - needs Singleton added - 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass - Singleton already added - 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - """ - cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) - inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) - chosen_schema_classes = schema_classes - inheritable_primitive_type - suffix = tuple(inheritable_primitive_type) - if enum_schema and suffix[0] not in {NoneClass, BoolClass}: - suffix = (Singleton,) + suffix - - used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) - path_to_schemas[path] = mfg_cls - - return path_to_schemas - - @classmethod - def _get_new_instance_without_conversion_oapg( - cls, - arg: typing.Any, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - # We have a Dynamic class and we are making an instance of it - if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): - properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, properties) - elif issubclass(cls, tuple) and issubclass(cls, ListBase): - items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, items) - """ - str = openapi str, date, and datetime - decimal.Decimal = openapi int and float - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return super(Schema, cls).__new__(cls, arg) - - @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Union[ - str, - date, - datetime, - int, - float, - decimal.Decimal, - bool, - None, - 'Schema', - dict, - frozendict.frozendict, - tuple, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - _configuration: typing.Optional[Configuration] - ): - """ - Schema from_openapi_data_oapg - """ - from_server = True - validated_path_to_schemas = {} - arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) - validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) - path_to_schemas = cls.__get_new_cls(arg, validation_metadata) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - - @staticmethod - def __remove_unsets(kwargs): - return {key: val for key, val in kwargs.items() if val is not unset} - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): - """ - Schema __new__ - - Args: - _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - _configuration: contains the Configuration that enables json schema validation keywords - like minItems, minLength etc - - Note: double underscores are used here because pycharm thinks that these variables - are instance properties if they are named normally :( - """ - __kwargs = cls.__remove_unsets(kwargs) - if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and _args and not isinstance(_args[0], dict): - __arg = _args[0] - else: - __arg = cls.__get_input_dict(*_args, **__kwargs) - __from_server = False - __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) - __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) - __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) - __new_cls = __path_to_schemas[__validation_metadata.path_to_item] - return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas - ) - - def __init__( - self, - *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] - ): - """ - this is needed to fix 'Unexpected argument' warning in pycharm - this code does nothing because all Schema instances are immutable - this means that all input data is passed into and used in new, and after the new instance is made - no new attributes are assigned and init is not used - """ - pass - -""" -import itertools -data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') -type_to_cls = { - 'None': 'NoneClass', - 'FrozenDict': 'frozendict.frozendict', - 'Tuple': 'tuple', - 'Str': 'str', - 'Decimal': 'decimal.Decimal', - 'Bool': 'BoolClass' -} -cls_tuples = [v for v in itertools.combinations(data_types, 5)] -typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] -for cls in typed_classes: - print(cls) -object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] -for cls in object_classes: - print(cls) -""" -if typing.TYPE_CHECKING: - # qty 1 - NoneMixin = NoneClass - FrozenDictMixin = frozendict.frozendict - TupleMixin = tuple - StrMixin = str - DecimalMixin = decimal.Decimal - BoolMixin = BoolClass - BytesMixin = bytes - FileMixin = FileIO - # qty 2 - class BinaryMixin(bytes, FileIO): - pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): - pass - class NoneTupleMixin(NoneClass, tuple): - pass - class NoneStrMixin(NoneClass, str): - pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): - pass - class NoneBoolMixin(NoneClass, BoolClass): - pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): - pass - class FrozenDictStrMixin(frozendict.frozendict, str): - pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): - pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): - pass - class TupleStrMixin(tuple, str): - pass - class TupleDecimalMixin(tuple, decimal.Decimal): - pass - class TupleBoolMixin(tuple, BoolClass): - pass - class StrDecimalMixin(str, decimal.Decimal): - pass - class StrBoolMixin(str, BoolClass): - pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): - pass - # qty 3 - class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): - pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): - pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): - pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): - pass - class NoneTupleStrMixin(NoneClass, tuple, str): - pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): - pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): - pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): - pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): - pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): - pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): - pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): - pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): - pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): - pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): - pass - class TupleStrBoolMixin(tuple, str, BoolClass): - pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): - pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): - pass - # qty 4 - class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): - pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): - pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): - pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): - pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): - pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): - pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): - pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): - pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): - pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): - pass - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): - pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): - pass -else: - # qty 1 - class NoneMixin: - _types = {NoneClass} - class FrozenDictMixin: - _types = {frozendict.frozendict} - class TupleMixin: - _types = {tuple} - class StrMixin: - _types = {str} - class DecimalMixin: - _types = {decimal.Decimal} - class BoolMixin: - _types = {BoolClass} - class BytesMixin: - _types = {bytes} - class FileMixin: - _types = {FileIO} - # qty 2 - class BinaryMixin: - _types = {bytes, FileIO} - class NoneFrozenDictMixin: - _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: - _types = {NoneClass, tuple} - class NoneStrMixin: - _types = {NoneClass, str} - class NoneDecimalMixin: - _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: - _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: - _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: - _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: - _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: - _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: - _types = {tuple, str} - class TupleDecimalMixin: - _types = {tuple, decimal.Decimal} - class TupleBoolMixin: - _types = {tuple, BoolClass} - class StrDecimalMixin: - _types = {str, decimal.Decimal} - class StrBoolMixin: - _types = {str, BoolClass} - class DecimalBoolMixin: - _types = {decimal.Decimal, BoolClass} - # qty 3 - class NoneFrozenDictTupleMixin: - _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: - _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: - _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: - _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: - _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: - _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: - _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: - _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: - _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: - _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: - _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: - _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: - _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: - _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: - _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: - _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: - _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: - _types = {str, decimal.Decimal, BoolClass} - # qty 4 - class NoneFrozenDictTupleStrMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: - _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: - _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: - _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: - _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: - _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: - _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: - _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: - _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} - - -class ValidatorBase: - @staticmethod - def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - Note: the suffix _oapg stands for openapi python (experimental) generator and - it has been added to prevent collisions with other methods and properties - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - @staticmethod - def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class EnumBase: - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - EnumBase _validate_oapg - Validates that arg is in the enum's allowed values - """ - try: - cls.MetaOapg.enum_value_to_name[arg] - except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class BoolBase: - def is_true_oapg(self) -> bool: - """ - A replacement for x is True - True if the instance is a BoolClass True Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) - - def is_false_oapg(self) -> bool: - """ - A replacement for x is False - True if the instance is a BoolClass False Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) is False - - -class NoneBase: - def is_none_oapg(self) -> bool: - """ - A replacement for x is None - True if the instance is a NoneClass None Singleton - """ - if issubclass(self.__class__, NoneClass): - return True - return False - - -class StrBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_str_oapg(self) -> str: - return self - - @property - def as_date_oapg(self) -> date: - raise Exception('not implemented') - - @property - def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') - - @property - def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') - - @property - def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') - - @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): - for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - StrBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, str): - cls.__check_str_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class UUIDBase: - @property - @functools.lru_cache() - def as_uuid_oapg(self) -> uuid.UUID: - return uuid.UUID(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - uuid.UUID(arg) - return True - except ValueError: - raise ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - UUIDBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class CustomIsoparser(isoparser): - - @_takes_ascii - def parse_isodatetime(self, dt_str): - components, pos = self._parse_isodate(dt_str) - if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) - else: - raise ValueError('String contains unknown ISO components') - - if len(components) > 3 and components[3] == 24: - components[3] = 0 - return datetime(*components) + timedelta(days=1) - - if len(components) <= 3: - raise ValueError('Value is not a datetime') - - return datetime(*components) - - @_takes_ascii - def parse_isodate(self, datestr): - components, pos = self._parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return date(*components) - - -DEFAULT_ISOPARSER = CustomIsoparser() - - -class DateBase: - @property - @functools.lru_cache() - def as_date_oapg(self) -> date: - return DEFAULT_ISOPARSER.parse_isodate(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodate(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - DateBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DateTimeBase: - @property - @functools.lru_cache() - def as_datetime_oapg(self) -> datetime: - return DEFAULT_ISOPARSER.parse_isodatetime(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodatetime(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DateTimeBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DecimalBase: - """ - A class for storing decimals that are sent over the wire as strings - These schemas must remain based on StrBase rather than NumberBase - because picking base classes must be deterministic - """ - - @property - @functools.lru_cache() - def as_decimal_oapg(self) -> decimal.Decimal: - return decimal.Decimal(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - decimal.Decimal(arg) - return True - except decimal.InvalidOperation: - raise ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DecimalBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class NumberBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - """ - Note: for some numbers like 9.0 they could be represented as an - integer but our code chooses to store them as - >>> Decimal('9.0').as_tuple() - DecimalTuple(sign=0, digits=(9, 0), exponent=-1) - so we can tell that the value came from a float and convert it back to a float - during later serialization - """ - if self.as_tuple().exponent < 0: - # this could be represented as an integer but should be represented as a float - # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') - self._as_int = int(self) - return self._as_int - - @property - def as_float_oapg(self) -> float: - try: - return self._as_float - except AttributeError: - if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') - self._as_float = float(self) - return self._as_float - - @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): - multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item - ) - - checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', - } - ) - if not checking_max_or_min_values: - return - - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - NumberBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, decimal.Decimal): - cls.__check_numeric_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class ListBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @classmethod - def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for items are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - list_items: the input list of items - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - - # if we have definitions for an items schema, use it - # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) - item_cls = cls._get_class_oapg(item_cls) - path_to_schemas = {} - for i, value in enumerate(list_items): - item_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): - unique_items = set(arg) - if len(arg) > len(unique_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - ListBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, tuple): - cls.__check_tuple_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, tuple): - return _path_to_schemas - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_items_oapg( - cls: 'Schema', - arg: typing.List[typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - ''' - ListBase _get_items_oapg - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return cast_items - - -class Discriminable: - MetaOapg: MetaOapgTyped - - @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): - if not args or args and disc_property_name not in args[0]: - # The input data does not contain the discriminator property - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - @classmethod - def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - if not hasattr(cls.MetaOapg, 'discriminator'): - return None - disc = cls.MetaOapg.discriminator() - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not hasattr(cls, 'MetaOapg'): - return None - elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): - for allof_cls in cls.MetaOapg.all_of(): - discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): - for oneof_cls in cls.MetaOapg.one_of(): - discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): - for anyof_cls in cls.MetaOapg.any_of(): - discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -class DictBase(Discriminable, ValidatorBase): - - @classmethod - def __validate_arg_presence(cls, arg): - """ - Ensures that: - - all required arguments are passed in - - the input variable names are valid - - present in properties or - - accepted because additionalProperties exists - Exceptions will be raised if: - - invalid arguments were passed in - - a var_name is invalid if additional_properties == NotAnyTypeSchema - and var_name not in properties.__annotations__ - - required properties were not passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - seen_required_properties = set() - invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name in arg: - if property_name in required_property_names: - seen_required_properties.add(property_name) - elif property_name in property_annotations: - continue - elif additional_properties is not NotAnyTypeSchema: - continue - else: - invalid_arguments.append(property_name) - missing_required_arguments = list(required_property_names - seen_required_properties) - if missing_required_arguments: - missing_required_arguments.sort() - raise ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - if invalid_arguments: - invalid_arguments.sort() - raise ApiTypeError( - "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments - ) - ) - - @classmethod - def __validate_args(cls, arg, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for properties are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) - if property_name in property_annotations: - schema = property_annotations[property_name] - elif additional_properties is not NotAnyTypeSchema: - if additional_properties is UnsetAnyTypeSchema: - """ - If additionalProperties is unset and this path_to_item does not yet have - any validations on it, validate it. - If it already has validations on it, skip this validation. - """ - if path_to_item in path_to_schemas: - continue - schema = additional_properties - else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) - schema = cls._get_class_oapg(schema) - arg_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DictBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, frozendict.frozendict): - cls.__check_dict_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, frozendict.frozendict): - return _path_to_schemas - cls.__validate_arg_presence(arg) - other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - try: - discriminator = cls.MetaOapg.discriminator() - except AttributeError: - return _path_to_schemas - # discriminator exists - disc_prop_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if updated_vm.validation_ran_earlier(discriminated_cls): - add_deeper_validated_schemas(updated_vm, _path_to_schemas) - return _path_to_schemas - other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_properties_oapg( - cls, - arg: typing.Dict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - """ - DictBase _get_properties_oapg, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return dict_items - - def __setattr__(self, name: str, value: typing.Any): - if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') - - def __getattr__(self, name: str): - """ - for instance.name access - Properties are only type hinted for required properties - so that hasattr(instance, 'optionalProp') is False when that key is not present - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - if name not in self.__class__.__annotations__: - raise AttributeError(f"{self} has no attribute '{name}'") - try: - value = self[name] - return value - except KeyError as ex: - raise AttributeError(str(ex)) - - def __getitem__(self, name: str): - """ - dict_instance[name] accessor - key errors thrown - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - return super().__getitem__(name) - - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: - # dict_instance[name] accessor - if not isinstance(self, frozendict.frozendict): - raise NotImplementedError() - try: - return super().__getitem__(name) - except KeyError: - return unset - - -def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), -) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - if isinstance(arg, Schema): - # store the already run validations - schema_classes = set() - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) - validated_path_to_schemas[path_to_item] = schema_classes - - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - return str(arg) - elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) - elif isinstance(arg, (bool, BoolClass)): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - if arg: - return BoolClass.TRUE - return BoolClass.FALSE - elif isinstance(arg, int): - return decimal.Decimal(arg) - elif isinstance(arg, float): - decimal_from_float = decimal.Decimal(arg) - if decimal_from_float.as_integer_ratio()[1] == 1: - # 9.0 -> Decimal('9.0') - # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') - return decimal_from_float - elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) - elif isinstance(arg, (none_type, NoneClass)): - return NoneClass.NONE - elif isinstance(arg, (date, datetime)): - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, decimal.Decimal): - return decimal.Decimal(arg) - elif isinstance(arg, bytes): - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class ComposedBase(Discriminable): - - @classmethod - def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): - path_to_schemas = defaultdict(set) - for allof_cls in cls.MetaOapg.all_of(): - if validation_metadata.validation_ran_earlier(allof_cls): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __get_oneof_class( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata, - ): - oneof_classes = [] - path_to_schemas = defaultdict(set) - for oneof_cls in cls.MetaOapg.one_of(): - if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(oneof_cls) - continue - if validation_metadata.validation_ran_earlier(oneof_cls): - oneof_classes.append(oneof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and oneof_cls is discriminated_cls: - raise ex - continue - oneof_classes.append(oneof_cls) - if not oneof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the oneOf schemas matched the input data.".format(cls) - ) - elif len(oneof_classes) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. Multiple " - "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) - ) - # exactly one class matches - return path_to_schemas - - @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): - anyof_classes = [] - path_to_schemas = defaultdict(set) - for anyof_cls in cls.MetaOapg.any_of(): - if validation_metadata.validation_ran_earlier(anyof_cls): - anyof_classes.append(anyof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and anyof_cls is discriminated_cls: - raise ex - continue - anyof_classes.append(anyof_cls) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - ComposedBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - # validation checking on types, validations, and enums - path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - - # process composed schema - discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): - discriminator = cls.MetaOapg.discriminator() - discriminated_cls = None - if discriminator and arg and isinstance(arg, frozendict.frozendict): - disc_property_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) - # get discriminated_cls by looking at the dict in the current class - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( - arg[disc_property_name], - cls.__name__, - disc_property_name, - list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) - ) - ) - - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): - other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): - other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): - other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): - not_cls = cls.MetaOapg.not_schema - not_cls = cls._get_class_oapg(not_cls) - if not_cls: - other_path_to_schemas = None - not_exception = ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_cls.__name__, - ) - ) - if updated_vm.validation_ran_earlier(not_cls): - raise not_exception - - try: - other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) - except (ApiValueError, ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - - if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): - # TODO use an exception from this package here - add_deeper_validated_schemas(updated_vm, path_to_schemas) - assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] - return path_to_schemas - - -# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase -class ComposedSchema( - ComposedBase, - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolMixin -): - @classmethod - def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): - if not args: - if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) - return super().from_openapi_data_oapg(args[0], _configuration=_configuration) - - -class ListSchema( - ListBase, - Schema, - TupleMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: None, **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class IntBase: - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - self._as_int = int(self) - return self._as_int - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - - denominator = arg.as_integer_ratio()[-1] - if denominator != 1: - raise ApiValueError( - "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - IntBase _validate_oapg - TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class IntSchema(IntBase, NumberSchema): - - @classmethod - def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class Int32Base: - __inclusive_minimum = decimal.Decimal(-2147483648) - __inclusive_maximum = decimal.Decimal(2147483647) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int32Schema( - Int32Base, - IntSchema -): - pass - - -class Int64Base: - __inclusive_minimum = decimal.Decimal(-9223372036854775808) - __inclusive_maximum = decimal.Decimal(9223372036854775807) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int64Schema( - Int64Base, - IntSchema -): - pass - - -class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Float32Schema( - Float32Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - -class Float64Schema( - Float64Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - # todo check format - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class StrSchema( - StrBase, - Schema, - StrMixin -): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class UUIDSchema(UUIDBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateSchema(DateBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateTimeSchema(DateTimeBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DecimalSchema(DecimalBase, StrSchema): - - def __new__(cls, _arg: str, **kwargs: Configuration): - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().__new__(cls, _arg, **kwargs) - - -class BytesSchema( - Schema, - BytesMixin -): - """ - this class will subclass bytes and is immutable - """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class FileSchema( - Schema, - FileMixin -): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class BinaryBase: - pass - - -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): - class MetaOapg: - @staticmethod - def one_of(): - return [ - BytesSchema, - FileSchema, - ] - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, _arg) - - -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, _arg, **kwargs) - - -class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin -): - # Python representation of a schema defined as true or {} - pass - - -class UnsetAnyTypeSchema(AnyTypeSchema): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - - -class NotAnyTypeSchema( - ComposedSchema, -): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - - class MetaOapg: - not_schema = AnyTypeSchema - - def __new__( - cls, - *_args, - _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *_args, **kwargs) - - -schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} - - -@functools.lru_cache() -def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] -) -> typing.Type[Schema]: - """ - Returns a new class that is made with the subclass bases - """ - new_cls: typing.Type[Schema] = type(class_name, bases, {}) - return new_cls - - -LOG_CACHE_USAGE = False - - -def log_cache_usage(cache_fn): - if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/.gitignore b/samples/openapi3/client/features/dynamic-servers/python/.gitignore deleted file mode 100644 index a62e8aba43f..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.gitignore +++ /dev/null @@ -1,67 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -dev-requirements.txt.log - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/samples/openapi3/client/features/dynamic-servers/python/.gitlab-ci.yml b/samples/openapi3/client/features/dynamic-servers/python/.gitlab-ci.yml deleted file mode 100644 index 3d7864a7672..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=dynamic_servers - -test-3.5: - extends: .tests - image: python:3.5-alpine -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests - image: python:3.7-alpine -test-3.8: - extends: .tests - image: python:3.8-alpine diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator-ignore b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/FILES b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/FILES deleted file mode 100644 index ae692977efe..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/FILES +++ /dev/null @@ -1,23 +0,0 @@ -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -docs/apis/tags/UsageApi.md -dynamic_servers/__init__.py -dynamic_servers/api_client.py -dynamic_servers/apis/__init__.py -dynamic_servers/apis/tags/usage_api.py -dynamic_servers/configuration.py -dynamic_servers/exceptions.py -dynamic_servers/model/__init__.py -dynamic_servers/models/__init__.py -dynamic_servers/rest.py -dynamic_servers/schemas.py -git_push.sh -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_models/__init__.py -tox.ini diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION deleted file mode 100644 index 757e6740040..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/.travis.yml b/samples/openapi3/client/features/dynamic-servers/python/.travis.yml deleted file mode 100644 index 2ed01c99738..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=dynamic_servers diff --git a/samples/openapi3/client/features/dynamic-servers/python/README.md b/samples/openapi3/client/features/dynamic-servers/python/README.md deleted file mode 100644 index 5af9af764cc..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/README.md +++ /dev/null @@ -1,202 +0,0 @@ -# dynamic-servers -This specification shows how to use dynamic servers. - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python >=3.7 - -## Migration from other generators like python and python-legacy - -### Changes -1. This generator uses spec case for all (object) property names and parameter names. - - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case - - So you will need to update how you input and read properties to use spec case -2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below) - - So you will need to update how you pass data in to endpoints -3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers - - So you will need to update your code to use response.body to access deserialized data -4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO - - This means that you can use isinstance to check if a payload validated against a schema class - - This means that no data will be of type None/True/False - - ingested None will subclass NoneClass - - ingested True will subclass BoolClass - - ingested False will subclass BoolClass - - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg() -5. All validated class instances are immutable except for ones based on io.File - - This is because if properties were changed after validation, that validation would no longer apply - - So no changing values or property values after a class has been instantiated -6. String + Number types with formats - - String type data is stored as a string and if you need to access types based on its format like date, - date-time, uuid, number etc then you will need to use accessor functions on the instance - - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg - - type number + format: See .as_float_oapg, .as_int_oapg - - this was done because openapi/json-schema defines constraints. string data may be type string with no format - keyword in one schema, and include a format constraint in another schema - - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg - - So if you need to access a number format based type, use as_int_oapg/as_float_oapg -7. Property access on AnyType(type unset) or object(dict) schemas - - Only required keys with valid python names are properties like .someProp and have type hints - - All optional keys may not exist, so properties are not defined for them - - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist - - Use get_item_oapg if you need a way to always get a value whether or not the key exists - - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp') - - All required and optional keys have type hints for this method, and @typing.overload is used - - A type hint is also generated for additionalProperties accessed using this method - - So you will need to update you code to use some_instance['optionalProp'] to access optional property - and additionalProperty values -8. The location of the api classes has changed - - Api classes are located in your_package.apis.tags.some_api - - This change was made to eliminate redundant code generation - - Legacy generators generated the same endpoint twice if it had > 1 tag on it - - This generator defines an endpoint in one class, then inherits that class to generate - apis by tags and by paths - - This change reduces code and allows quicker run time if you use the path apis - - path apis are at your_package.apis.paths.some_path - - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api - - So you will need to update your import paths to the api classes - -### Why are Oapg and _oapg used in class and method names? -Classes can have arbitrarily named properties set on them -Endpoints can have arbitrary operationId method names set -For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions -on protected + public classes/methods. -oapg stands for OpenApi Python Generator. - -### Object property spec case -This was done because when payloads are ingested, they can be validated against N number of schemas. -If the input signature used a different property name then that has mutated the payload. -So SchemaA and SchemaB must both see the camelCase spec named variable. -Also it is possible to send in two properties, named camelCase and camel_case in the same payload. -That use case should be support so spec case is used. - -### Parameter spec case -Parameters can be included in different locations including: -- query -- path -- header -- cookie - -Any of those parameters could use the same parameter names, so if every parameter -was included as an endpoint parameter in a function signature, they would collide. -For that reason, each of those inputs have been separated out into separate typed dictionaries: -- query_params -- path_params -- header_params -- cookie_params - -So when updating your code, you will need to pass endpoint parameters in using those -dictionaries. - -### Endpoint responses -Endpoint responses have been enriched to now include more information. -Any response reom an endpoint will now include the following properties: -response: urllib3.HTTPResponse -body: typing.Union[Unset, Schema] -headers: typing.Union[Unset, TODO] -Note: response header deserialization has not yet been added - - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import dynamic_servers -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import dynamic_servers -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import dynamic_servers -from pprint import pprint -from dynamic_servers.apis.tags import usage_api -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = dynamic_servers.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - - -# Enter a context with an instance of the API client -with dynamic_servers.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - - try: - # Use custom server - api_response = api_instance.custom_server() - pprint(api_response) - except dynamic_servers.ApiException as e: - print("Exception when calling UsageApi->custom_server: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*UsageApi* | [**custom_server**](docs/apis/tags/UsageApi.md#custom_server) | **get** /custom | Use custom server -*UsageApi* | [**default_server**](docs/apis/tags/UsageApi.md#default_server) | **get** /default | Use default server - -## Documentation For Models - - -## Documentation For Authorization - - Endpoints do not require authorization. - - -## Author - - - -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in dynamic_servers.apis and dynamic_servers.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from dynamic_servers.apis.default_api import DefaultApi` -- `from dynamic_servers.model.pet import Pet` - -Solution 1: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import dynamic_servers -from dynamic_servers.apis import * -from dynamic_servers.models import * -``` diff --git a/samples/openapi3/client/features/dynamic-servers/python/docs/UsageApi.md b/samples/openapi3/client/features/dynamic-servers/python/docs/UsageApi.md deleted file mode 100644 index d05596b2bf2..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/docs/UsageApi.md +++ /dev/null @@ -1,134 +0,0 @@ -# dynamic_servers.UsageApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**custom_server**](UsageApi.md#custom_server) | **GET** /custom | Use custom server -[**default_server**](UsageApi.md#default_server) | **GET** /default | Use default server - - -# **custom_server** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} custom_server() - -Use custom server - -Use custom server - -### Example - - -```python -import time -import dynamic_servers -from dynamic_servers.api import usage_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = dynamic_servers.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - - -# Enter a context with an instance of the API client -with dynamic_servers.ApiClient() as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Use custom server - api_response = api_instance.custom_server() - pprint(api_response) - except dynamic_servers.ApiException as e: - print("Exception when calling UsageApi->custom_server: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | successful operation | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **default_server** -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} default_server() - -Use default server - -Use default server - -### Example - - -```python -import time -import dynamic_servers -from dynamic_servers.api import usage_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = dynamic_servers.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - - -# Enter a context with an instance of the API client -with dynamic_servers.ApiClient() as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Use default server - api_response = api_instance.default_server() - pprint(api_response) - except dynamic_servers.ApiException as e: - print("Exception when calling UsageApi->default_server: %s\n" % e) -``` - - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | successful operation | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/samples/openapi3/client/features/dynamic-servers/python/docs/apis/tags/UsageApi.md b/samples/openapi3/client/features/dynamic-servers/python/docs/apis/tags/UsageApi.md deleted file mode 100644 index 26c3abdeaa7..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/docs/apis/tags/UsageApi.md +++ /dev/null @@ -1,136 +0,0 @@ - -# dynamic_servers.apis.tags.usage_api.UsageApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**custom_server**](#custom_server) | **get** /custom | Use custom server -[**default_server**](#default_server) | **get** /default | Use default server - -# **custom_server** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} custom_server() - -Use custom server - -Use custom server - -### Example - -```python -import dynamic_servers -from dynamic_servers.apis.tags import usage_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = dynamic_servers.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with dynamic_servers.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Use custom server - api_response = api_instance.custom_server() - pprint(api_response) - except dynamic_servers.ApiException as e: - print("Exception when calling UsageApi->custom_server: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#custom_server.ApiResponseFor200) | successful operation - -#### custom_server.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **default_server** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} default_server() - -Use default server - -Use default server - -### Example - -```python -import dynamic_servers -from dynamic_servers.apis.tags import usage_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = dynamic_servers.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with dynamic_servers.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = usage_api.UsageApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Use default server - api_response = api_instance.default_server() - pprint(api_response) - except dynamic_servers.ApiException as e: - print("Exception when calling UsageApi->default_server: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#default_server.ApiResponseFor200) | successful operation - -#### default_server.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/__init__.py deleted file mode 100644 index 887687d8b5b..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/__init__.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -__version__ = "1.0.0" - -# import ApiClient -from dynamic_servers.api_client import ApiClient - -# import Configuration -from dynamic_servers.configuration import Configuration - -# import exceptions -from dynamic_servers.exceptions import OpenApiException -from dynamic_servers.exceptions import ApiAttributeError -from dynamic_servers.exceptions import ApiTypeError -from dynamic_servers.exceptions import ApiValueError -from dynamic_servers.exceptions import ApiKeyError -from dynamic_servers.exceptions import ApiException diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/__init__.py deleted file mode 100644 index 9148df5be49..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all apis into this module because that uses a lot of memory and stack frames -# if you need the ability to import all apis from one package, import them with -# from dynamic_servers.apis import UsageApi diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py deleted file mode 100644 index d634bce7b5a..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api/usage_api.py +++ /dev/null @@ -1,326 +0,0 @@ -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import re # noqa: F401 -import sys # noqa: F401 - -from dynamic_servers.api_client import ApiClient, Endpoint as _Endpoint -from dynamic_servers.model_utils import ( # noqa: F401 - check_allowed_values, - check_validations, - date, - datetime, - file_type, - none_type, - validate_and_convert_types -) - - -class UsageApi(object): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - self.custom_server_endpoint = _Endpoint( - settings={ - 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), - 'auth': [], - 'endpoint_path': '/custom', - 'operation_id': 'custom_server', - 'http_method': 'GET', - 'servers': [ - { - 'url': "https://{server}.swagger.io:{port}/v2", - 'description': "No description provided", - 'variables': { - 'server': { - 'description': "No description provided", - 'default_value': "custom-petstore", - 'enum_values': [ - "custom-petstore", - "custom-qa-petstore", - "custom-dev-petstore" - ] - }, - 'port': { - 'description': "No description provided", - 'default_value': "8080", - 'enum_values': [ - "80", - "8080" - ] - } - } - }, - { - 'url': "https://localhost:8081/{version}", - 'description': "The local custom server", - 'variables': { - 'version': { - 'description': "No description provided", - 'default_value': "v2", - 'enum_values': [ - "v1", - "v2", - "v3" - ] - } - } - }, - { - 'url': "https://third.example.com/{prefix}", - 'description': "The local custom server", - 'variables': { - 'prefix': { - 'description': "No description provided", - 'default_value': "custom", - } - } - }, - ] - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - self.default_server_endpoint = _Endpoint( - settings={ - 'response_type': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), - 'auth': [], - 'endpoint_path': '/default', - 'operation_id': 'default_server', - 'http_method': 'GET', - 'servers': None, - }, - params_map={ - 'all': [ - ], - 'required': [], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] - }, - root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - }, - 'attribute_map': { - }, - 'location_map': { - }, - 'collection_format_map': { - } - }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [], - }, - api_client=api_client - ) - - def custom_server( - self, - **kwargs - ): - """Use custom server # noqa: E501 - - Use custom server # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.custom_server(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - {str: (bool, date, datetime, dict, float, int, list, str, none_type)} - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.custom_server_endpoint.call_with_http_info(**kwargs) - - def default_server( - self, - **kwargs - ): - """Use default server # noqa: E501 - - Use default server # noqa: E501 - This method makes a synchronous HTTP request by default. To make an - asynchronous HTTP request, please pass async_req=True - - >>> thread = api.default_server(async_req=True) - >>> result = thread.get() - - - Keyword Args: - _return_http_data_only (bool): response data without head status - code and headers. Default is True. - _preload_content (bool): if False, the urllib3.HTTPResponse object - will be returned without reading/decoding response data. - Default is True. - _request_timeout (int/float/tuple): timeout setting for this request. If - one number provided, it will be total request timeout. It can also - be a pair (tuple) of (connection, read) timeouts. - Default is None. - _check_input_type (bool): specifies if type checking - should be done one the data sent to the server. - Default is True. - _check_return_type (bool): specifies if type checking - should be done one the data received from the server. - Default is True. - _spec_property_naming (bool): True if the variable names in the input data - are serialized names, as specified in the OpenAPI document. - False if the variable names in the input data - are pythonic names, e.g. snake case (default) - _content_type (str/None): force body content-type. - Default is None and content-type will be predicted by allowed - content-types and body. - _host_index (int/None): specifies the index of the server - that we want to use. - Default is read from the configuration. - _request_auths (list): set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - Default is None - async_req (bool): execute request asynchronously - - Returns: - {str: (bool, date, datetime, dict, float, int, list, str, none_type)} - If the method is called asynchronously, returns the request - thread. - """ - kwargs['async_req'] = kwargs.get( - 'async_req', False - ) - kwargs['_return_http_data_only'] = kwargs.get( - '_return_http_data_only', True - ) - kwargs['_preload_content'] = kwargs.get( - '_preload_content', True - ) - kwargs['_request_timeout'] = kwargs.get( - '_request_timeout', None - ) - kwargs['_check_input_type'] = kwargs.get( - '_check_input_type', True - ) - kwargs['_check_return_type'] = kwargs.get( - '_check_return_type', True - ) - kwargs['_spec_property_naming'] = kwargs.get( - '_spec_property_naming', False - ) - kwargs['_content_type'] = kwargs.get( - '_content_type') - kwargs['_host_index'] = kwargs.get('_host_index') - kwargs['_request_auths'] = kwargs.get('_request_auths', None) - return self.default_server_endpoint.call_with_http_info(**kwargs) - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py deleted file mode 100644 index 63147d075d2..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/api_client.py +++ /dev/null @@ -1,1499 +0,0 @@ -# coding: utf-8 -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -from decimal import Decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing.pool import ThreadPool -import re -import tempfile -import typing -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote -from urllib3.fields import RequestField as RequestFieldBase - -import frozendict - -from dynamic_servers import rest -from dynamic_servers.configuration import Configuration -from dynamic_servers.exceptions import ApiTypeError, ApiValueError -from dynamic_servers.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, - date, - datetime, - none_type, - Unset, - unset, -) - - -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return float(obj) - elif isinstance(obj, int): - return int(obj) - elif isinstance(obj, Decimal): - if obj.as_tuple().exponent >= 0: - return int(obj) - return float(obj) - elif isinstance(obj, NoneClass): - return None - elif isinstance(obj, BoolClass): - return bool(obj) - elif isinstance(obj, (dict, frozendict.frozendict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - - def __init__(self, prefix: str, separator: str): - self.prefix = prefix - self.separator = separator - self.first = True - if separator in {'.', '|', '%20'}: - item_separator = separator - else: - item_separator = ',' - self.item_separator = item_separator - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return quote(str(in_data)) - return str(in_data) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - if style is ParameterStyle.FORM: - return True - return super()._get_default_explode(style) - - def _serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -@dataclass -class ParameterBase(JSONDetector): - name: str - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] - - __style_to_in_type = { - ParameterStyle.MATRIX: {ParameterInType.PATH}, - ParameterStyle.LABEL: {ParameterInType.PATH}, - ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, - ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, - ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, - } - __in_type_to_default_style = { - ParameterInType.QUERY: ParameterStyle.FORM, - ParameterInType.PATH: ParameterStyle.SIMPLE, - ParameterInType.HEADER: ParameterStyle.SIMPLE, - ParameterInType.COOKIE: ParameterStyle.FORM, - } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} - _json_encoder = JSONEncoder() - - @classmethod - def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): - if style is None: - return - in_type_set = cls.__style_to_in_type[style] - if in_type not in in_type_set: - raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( - style, in_type_set - ) - ) - - def __init__( - self, - name: str, - in_type: ParameterInType, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') - if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) - self.__verify_style_to_in_type(style, in_type) - if content is None and style is None: - style = self.__in_type_to_default_style[in_type] - if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') - self.in_type = in_type - self.name = name - self.required = required - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - self.schema = schema - self.content = content - - def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=self._json_encoder.compact_separators) - return json.dumps(in_data) - - -class PathParameter(ParameterBase, StyleSimpleSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.PATH, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) - return self._to_dict(self.name, value) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if self.style: - if self.style is ParameterStyle.SIMPLE: - return self.__serialize_simple(cast_in_data) - elif self.style is ParameterStyle.LABEL: - return self.__serialize_label(cast_in_data) - elif self.style is ParameterStyle.MATRIX: - return self.__serialize_matrix(cast_in_data) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class QueryParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.QUERY, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_space_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_pipe_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._serialize_form( - in_data, - name=self.name, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if self.style: - # TODO update query ones to omit setting values when [] {} or None is input - if self.style is ParameterStyle.FORM: - return self.__serialize_form(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.SPACE_DELIMITED: - return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.PIPE_DELIMITED: - return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) - # self.content will be length one - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class CookieParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.COOKIE, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if self.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - value = self._serialize_form( - cast_in_data, - explode=self.explode, - name=self.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return self._to_dict(self.name, value) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class HeaderParameter(ParameterBase, StyleSimpleSerializer): - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.HEADER, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> HTTPHeaderDict: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class Encoding: - def __init__( - self, - content_type: str, - headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: bool = False, - ): - self.content_type = content_type - self.headers = headers - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - - -@dataclass -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - def __init__( - self, - response: urllib3.HTTPResponse, - body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - ): - """ - pycharm needs this to prevent 'Unexpected argument' warnings - """ - self.response = response - self.body = body - self.headers = headers - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - def __init__( - self, - response_cls: typing.Type[ApiResponse] = ApiResponse, - content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, - ): - self.headers = headers - if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - self.response_cls = response_cls - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - def __deserialize_application_octet_stream( - self, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as new_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - new_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') - deserialized_body = unset - streamed = response.supports_chunked_reads() - - deserialized_headers = unset - if self.headers is not None: - # TODO add header deserialiation here - pass - - if self.content is not None: - if content_type not in self.content: - raise ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" - ) - body_schema = self.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) - - if self._content_type_is_json(content_type): - body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) - elif streamed: - response.release_conn() - - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - _pool = None - - def __init__( - self, - configuration: typing.Optional[Configuration] = None, - header_name: typing.Optional[str] = None, - header_value: typing.Optional[str] = None, - cookie: typing.Optional[str] = None, - pool_threads: int = 1 - ): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = HTTPHeaderDict() - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - - # header parameters - used_headers = HTTPHeaderDict(self.default_headers) - if self.cookie: - headers['Cookie'] = self.cookie - - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) - - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - if host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = host + resource_path - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings: Auth Settings names for the request. - :param async_req: execute request asynchronously - :type async_req: bool, optional TODO remove, unused - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystme file and the BinarySchema - instance will also inherit from FileSchema and FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - - if not async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if not auth_setting: - continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query - need to pass in prefix_separator_iterator - and need to output resource_path with query params added - """ - raise ApiValueError("Auth in query not yet implemented") - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - -class Api: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - - def _get_host_oapg( - self, - operation_id: str, - servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None - ) -> typing.Optional[str]: - configuration = self.api_client.configuration - try: - if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) - else: - index = host_index - server_variables = configuration.server_operation_variables.get( - operation_id, configuration.server_variables - ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers - ) - except IndexError: - if servers: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(servers) - ) - host = None - return host - - -class SerializedRequestBody(typing_extensions.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType Schema info - """ - __json_encoder = JSONEncoder() - - def __init__( - self, - content: typing.Dict[str, MediaType], - required: bool = False, - ): - self.required = required - if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: - in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return dict(body=json_str) - - @staticmethod - def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: - if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') - elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') - elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') - elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') - return dict(body=str(in_data)) - - def __multipart_json_item(self, key: str, value: Schema) -> RequestField: - json_value = self.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - def __multipart_form_item(self, key: str, value: Schema) -> RequestField: - if isinstance(value, str): - request_field = 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.make_multipart(content_type='application/octet-stream') - elif isinstance(value, FileIO): - # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) - value.close() - else: - request_field = self.__multipart_json_item(key=key, value=value) - return request_field - - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: - if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - 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 - for item in value: - request_field = self.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = self.__multipart_json_item(key=key, value=value) - fields.append(request_field) - else: - request_field = self.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return dict(fields=tuple(fields)) - - def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: - if isinstance(in_data, bytes): - return dict(body=in_data) - # FileIO type - result = dict(body=in_data.read()) - in_data.close() - return result - - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - if not isinstance(in_data, frozendict.frozendict): - raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') - cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return dict(body=value) - - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = self.content[content_type] - if isinstance(in_data, media_type.schema): - cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = media_type.schema(**in_data) - else: - cast_in_data = media_type.schema(in_data) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if self._content_type_is_json(content_type): - return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': - return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/path_to_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/path_to_api.py deleted file mode 100644 index 0ee69ff5afd..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/path_to_api.py +++ /dev/null @@ -1,20 +0,0 @@ -import typing_extensions - -from dynamic_servers.paths import PathValues -from dynamic_servers.apis.paths.default import Default -from dynamic_servers.apis.paths.custom import Custom - -PathToApi = typing_extensions.TypedDict( - 'PathToApi', - { - PathValues.DEFAULT: Default, - PathValues.CUSTOM: Custom, - } -) - -path_to_api = PathToApi( - { - PathValues.DEFAULT: Default, - PathValues.CUSTOM: Custom, - } -) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/__init__.py deleted file mode 100644 index eabedf0f659..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from dynamic_servers.apis.path_to_api import path_to_api diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/custom.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/custom.py deleted file mode 100644 index 3f82f1a0d47..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/custom.py +++ /dev/null @@ -1,7 +0,0 @@ -from dynamic_servers.paths.custom.get import ApiForget - - -class Custom( - ApiForget, -): - pass diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/default.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/default.py deleted file mode 100644 index 22d4848e13d..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/paths/default.py +++ /dev/null @@ -1,7 +0,0 @@ -from dynamic_servers.paths.default.get import ApiForget - - -class Default( - ApiForget, -): - pass diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tag_to_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tag_to_api.py deleted file mode 100644 index fb38df5157f..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tag_to_api.py +++ /dev/null @@ -1,17 +0,0 @@ -import typing_extensions - -from dynamic_servers.apis.tags import TagValues -from dynamic_servers.apis.tags.usage_api import UsageApi - -TagToApi = typing_extensions.TypedDict( - 'TagToApi', - { - TagValues.USAGE: UsageApi, - } -) - -tag_to_api = TagToApi( - { - TagValues.USAGE: UsageApi, - } -) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/__init__.py deleted file mode 100644 index 2e44715917b..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from dynamic_servers.apis.tag_to_api import tag_to_api - -import enum - - -class TagValues(str, enum.Enum): - USAGE = "usage" diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/usage_api.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/usage_api.py deleted file mode 100644 index 0c8658ad88e..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/apis/tags/usage_api.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from dynamic_servers.paths.custom.get import CustomServer -from dynamic_servers.paths.default.get import DefaultServer - - -class UsageApi( - CustomServer, - DefaultServer, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py deleted file mode 100644 index 95cdbbb014f..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/configuration.py +++ /dev/null @@ -1,460 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -from http import client as http_client -from dynamic_servers.exceptions import ApiValueError - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - """ - - _default = None - - def __init__( - self, - host=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - ): - """Constructor - """ - self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.disabled_client_side_validations = disabled_client_side_validations - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("dynamic_servers") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "http://{server}.swagger.io:{port}/v2", - 'description': "petstore server", - 'variables': { - 'server': { - 'description': "No description provided", - 'default_value': "petstore", - 'enum_values': [ - "petstore", - "qa-petstore", - "dev-petstore" - ] - }, - 'port': { - 'description': "No description provided", - 'default_value': "80", - 'enum_values': [ - "80", - "8080" - ] - } - } - }, - { - 'url': "https://localhost:8080/{version}", - 'description': "The local server", - 'variables': { - 'version': { - 'description': "No description provided", - 'default_value': "v1", - 'enum_values': [ - "v1", - "v2", - "v3" - ] - } - } - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py deleted file mode 100644 index 0c3bd2fd8a2..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/exceptions.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -import dataclasses -import typing - -from urllib3._collections import HTTPHeaderDict - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -T = typing.TypeVar("T") - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: str - api_response: typing.Optional[T] = None - - @property - def body(self) -> typing.Union[str, bytes, None]: - if not self.api_response: - return None - return self.api_response.response.data - - @property - def headers(self) -> typing.Optional[HTTPHeaderDict]: - if not self.api_response: - return None - return self.api_response.response.getheaders() - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model/__init__.py deleted file mode 100644 index 96df4662142..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from dynamic_servers.models import ModelA, ModelB diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py deleted file mode 100644 index a7da81cfaf6..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py +++ /dev/null @@ -1,2058 +0,0 @@ -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from datetime import date, datetime # noqa: F401 -from copy import deepcopy -import inspect -import io -import os -import pprint -import re -import tempfile -import uuid - -from dateutil.parser import parse - -from dynamic_servers.exceptions import ( - ApiKeyError, - ApiAttributeError, - ApiTypeError, - ApiValueError, -) - -none_type = type(None) -file_type = io.IOBase - - -def convert_js_args_to_python_args(fn): - from functools import wraps - @wraps(fn) - def wrapped_init(_self, *args, **kwargs): - """ - An attribute named `self` received from the api will conflicts with the reserved `self` - parameter of a class method. During generation, `self` attributes are mapped - to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts. - """ - spec_property_naming = kwargs.get('_spec_property_naming', False) - if spec_property_naming: - kwargs = change_keys_js_to_python( - kwargs, _self if isinstance( - _self, type) else _self.__class__) - return fn(_self, *args, **kwargs) - return wrapped_init - - -class cached_property(object): - # this caches the result of the function call for fn with no inputs - # use this as a decorator on function methods that you want converted - # into cached properties - result_key = '_results' - - def __init__(self, fn): - self._fn = fn - - def __get__(self, instance, cls=None): - if self.result_key in vars(self): - return vars(self)[self.result_key] - else: - result = self._fn() - setattr(self, self.result_key, result) - return result - - -PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type) - - -def allows_single_value_input(cls): - """ - This function returns True if the input composed schema model or any - descendant model allows a value only input - This is true for cases where oneOf contains items like: - oneOf: - - float - - NumberWithValidation - - StringEnum - - ArrayModel - - null - TODO: lru_cache this - """ - if ( - issubclass(cls, ModelSimple) or - cls in PRIMITIVE_TYPES - ): - return True - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return False - return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf']) - return False - - -def composed_model_input_classes(cls): - """ - This function returns a list of the possible models that can be accepted as - inputs. - TODO: lru_cache this - """ - if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES: - return [cls] - elif issubclass(cls, ModelNormal): - if cls.discriminator is None: - return [cls] - else: - return get_discriminated_classes(cls) - elif issubclass(cls, ModelComposed): - if not cls._composed_schemas['oneOf']: - return [] - if cls.discriminator is None: - input_classes = [] - for c in cls._composed_schemas['oneOf']: - input_classes.extend(composed_model_input_classes(c)) - return input_classes - else: - return get_discriminated_classes(cls) - return [] - - -class OpenApiModel(object): - """The base class for all OpenAPIModels""" - - def set_attribute(self, name, value): - # this is only used to set properties on self - - path_to_item = [] - if self._path_to_item: - path_to_item.extend(self._path_to_item) - path_to_item.append(name) - - if name in self.openapi_types: - required_types_mixed = self.openapi_types[name] - elif self.additional_properties_type is None: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - path_to_item - ) - elif self.additional_properties_type is not None: - required_types_mixed = self.additional_properties_type - - if get_simple_class(name) != str: - error_msg = type_error_message( - var_name=name, - var_value=name, - valid_classes=(str,), - key_type=True - ) - raise ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=(str,), - key_type=True - ) - - if self._check_type: - value = validate_and_convert_types( - value, required_types_mixed, path_to_item, self._spec_property_naming, - self._check_type, configuration=self._configuration) - if (name,) in self.allowed_values: - check_allowed_values( - self.allowed_values, - (name,), - value - ) - if (name,) in self.validations: - check_validations( - self.validations, - (name,), - value, - self._configuration - ) - self.__dict__['_data_store'][name] = value - - def __repr__(self): - """For `print` and `pprint`""" - return self.to_str() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - return not self == other - - def __setattr__(self, attr, value): - """set the value of an attribute using dot notation: `instance.attr = val`""" - self[attr] = value - - def __getattr__(self, attr): - """get the value of an attribute using dot notation: `instance.attr`""" - return self.__getitem__(attr) - - def __copy__(self): - cls = self.__class__ - if self.get("_spec_property_naming", False): - return cls._new_from_openapi_data(**self.__dict__) - else: - return cls.__new__(cls, **self.__dict__) - - def __deepcopy__(self, memo): - cls = self.__class__ - - if self.get("_spec_property_naming", False): - new_inst = cls._new_from_openapi_data() - else: - new_inst = cls.__new__(cls, **self.__dict__) - - for k, v in self.__dict__.items(): - setattr(new_inst, k, deepcopy(v, memo)) - return new_inst - - - def __new__(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return super(OpenApiModel, cls).__new__(cls) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return super(OpenApiModel, cls).__new__(cls) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = super(OpenApiModel, cls).__new__(cls) - self_inst.__init__(*args, **kwargs) - - if kwargs.get("_spec_property_naming", False): - # when true, implies new is from deserialization - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - else: - new_inst = new_cls.__new__(new_cls, *args, **kwargs) - new_inst.__init__(*args, **kwargs) - - return new_inst - - @classmethod - @convert_js_args_to_python_args - def _new_from_openapi_data(cls, *args, **kwargs): - # this function uses the discriminator to - # pick a new schema/class to instantiate because a discriminator - # propertyName value was passed in - - if len(args) == 1: - arg = args[0] - if arg is None and is_type_nullable(cls): - # The input data is the 'null' value and the type is nullable. - return None - - if issubclass(cls, ModelComposed) and allows_single_value_input(cls): - model_kwargs = {} - oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg) - return oneof_instance - - visited_composed_classes = kwargs.get('_visited_composed_classes', ()) - if ( - cls.discriminator is None or - cls in visited_composed_classes - ): - # Use case 1: this openapi schema (cls) does not have a discriminator - # Use case 2: we have already visited this class before and are sure that we - # want to instantiate it this time. We have visited this class deserializing - # a payload with a discriminator. During that process we traveled through - # this class but did not make an instance of it. Now we are making an - # instance of a composed class which contains cls in it, so this time make an instance of cls. - # - # Here's an example of use case 2: If Animal has a discriminator - # petType and we pass in "Dog", and the class Dog - # allOf includes Animal, we move through Animal - # once using the discriminator, and pick Dog. - # Then in the composed schema dog Dog, we will make an instance of the - # Animal class (because Dal has allOf: Animal) but this time we won't travel - # through Animal's discriminator because we passed in - # _visited_composed_classes = (Animal,) - - return cls._from_openapi_data(*args, **kwargs) - - # Get the name and value of the discriminator property. - # The discriminator name is obtained from the discriminator meta-data - # and the discriminator value is obtained from the input data. - discr_propertyname_py = list(cls.discriminator.keys())[0] - discr_propertyname_js = cls.attribute_map[discr_propertyname_py] - if discr_propertyname_js in kwargs: - discr_value = kwargs[discr_propertyname_js] - elif discr_propertyname_py in kwargs: - discr_value = kwargs[discr_propertyname_py] - else: - # The input data does not contain the discriminator property. - path_to_item = kwargs.get('_path_to_item', ()) - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '%s' is missing at path: %s" % - (discr_propertyname_js, path_to_item) - ) - - # Implementation note: the last argument to get_discriminator_class - # is a list of visited classes. get_discriminator_class may recursively - # call itself and update the list of visited classes, and the initial - # value must be an empty list. Hence not using 'visited_composed_classes' - new_cls = get_discriminator_class( - cls, discr_propertyname_py, discr_value, []) - if new_cls is None: - path_to_item = kwargs.get('_path_to_item', ()) - disc_prop_value = kwargs.get( - discr_propertyname_js, kwargs.get(discr_propertyname_py)) - raise ApiValueError( - "Cannot deserialize input data due to invalid discriminator " - "value. The OpenAPI document has no mapping for discriminator " - "property '%s'='%s' at path: %s" % - (discr_propertyname_js, disc_prop_value, path_to_item) - ) - - if new_cls in visited_composed_classes: - # if we are making an instance of a composed schema Descendent - # which allOf includes Ancestor, then Ancestor contains - # a discriminator that includes Descendent. - # So if we make an instance of Descendent, we have to make an - # instance of Ancestor to hold the allOf properties. - # This code detects that use case and makes the instance of Ancestor - # For example: - # When making an instance of Dog, _visited_composed_classes = (Dog,) - # then we make an instance of Animal to include in dog._composed_instances - # so when we are here, cls is Animal - # cls.discriminator != None - # cls not in _visited_composed_classes - # new_cls = Dog - # but we know we know that we already have Dog - # because it is in visited_composed_classes - # so make Animal here - return cls._from_openapi_data(*args, **kwargs) - - # Build a list containing all oneOf and anyOf descendants. - oneof_anyof_classes = None - if cls._composed_schemas is not None: - oneof_anyof_classes = ( - cls._composed_schemas.get('oneOf', ()) + - cls._composed_schemas.get('anyOf', ())) - oneof_anyof_child = new_cls in oneof_anyof_classes - kwargs['_visited_composed_classes'] = visited_composed_classes + (cls,) - - if cls._composed_schemas.get('allOf') and oneof_anyof_child: - # Validate that we can make self because when we make the - # new_cls it will not include the allOf validations in self - self_inst = cls._from_openapi_data(*args, **kwargs) - - new_inst = new_cls._new_from_openapi_data(*args, **kwargs) - return new_inst - - -class ModelSimple(OpenApiModel): - """the parent class of models whose type != object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_str(self): - """Returns the string representation of the model""" - return str(self.value) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - this_val = self._data_store['value'] - that_val = other._data_store['value'] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - return vals_equal - - -class ModelNormal(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi""" - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - self.set_attribute(name, value) - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - return self.__dict__['_data_store'].get(name, default) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - if name in self: - return self.get(name) - - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - if name in self.required_properties: - return name in self.__dict__ - - return name in self.__dict__['_data_store'] - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -class ModelComposed(OpenApiModel): - """the parent class of models whose type == object in their - swagger/openapi and have oneOf/allOf/anyOf - - When one sets a property we use var_name_to_model_instances to store the value in - the correct class instances + run any type checking + validation code. - When one gets a property we use var_name_to_model_instances to get the value - from the correct class instances. - This allows multiple composed schemas to contain the same property with additive - constraints on the value. - - _composed_schemas (dict) stores the anyOf/allOf/oneOf classes - key (str): allOf/oneOf/anyOf - value (list): the classes in the XOf definition. - Note: none_type can be included when the openapi document version >= 3.1.0 - _composed_instances (list): stores a list of instances of the composed schemas - defined in _composed_schemas. When properties are accessed in the self instance, - they are returned from the self._data_store or the data stores in the instances - in self._composed_schemas - _var_name_to_model_instances (dict): maps between a variable name on self and - the composed instances (self included) which contain that data - key (str): property name - value (list): list of class instances, self or instances in _composed_instances - which contain the value that the key is referring to. - """ - - def __setitem__(self, name, value): - """set the value of an attribute using square-bracket notation: `instance[attr] = val`""" - if name in self.required_properties: - self.__dict__[name] = value - return - - """ - Use cases: - 1. additional_properties_type is None (additionalProperties == False in spec) - Check for property presence in self.openapi_types - if not present then throw an error - if present set in self, set attribute - always set on composed schemas - 2. additional_properties_type exists - set attribute on self - always set on composed schemas - """ - if self.additional_properties_type is None: - """ - For an attribute to exist on a composed schema it must: - - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND - - fulfill schema_requirements in each oneOf/anyOf/allOf schemas - - schema_requirements: - For an attribute to exist on a schema it must: - - be present in properties at the schema OR - - have additionalProperties unset (defaults additionalProperties = any type) OR - - have additionalProperties set - """ - if name not in self.openapi_types: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - # attribute must be set on self and composed instances - self.set_attribute(name, value) - for model_instance in self._composed_instances: - setattr(model_instance, name, value) - if name not in self._var_name_to_model_instances: - # we assigned an additional property - self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self] - return None - - __unset_attribute_value__ = object() - - def get(self, name, default=None): - """returns the value of an attribute or some default value if the attribute was not set""" - if name in self.required_properties: - return self.__dict__[name] - - # get the attribute from the correct instance - model_instances = self._var_name_to_model_instances.get(name) - values = [] - # A composed model stores self and child (oneof/anyOf/allOf) models under - # self._var_name_to_model_instances. - # Any property must exist in self and all model instances - # The value stored in all model instances must be the same - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - v = model_instance._data_store[name] - if v not in values: - values.append(v) - len_values = len(values) - if len_values == 0: - return default - elif len_values == 1: - return values[0] - elif len_values > 1: - raise ApiValueError( - "Values stored for property {0} in {1} differ when looking " - "at self and self's composed instances. All values must be " - "the same".format(name, type(self).__name__), - [e for e in [self._path_to_item, name] if e] - ) - - def __getitem__(self, name): - """get the value of an attribute using square-bracket notation: `instance[attr]`""" - value = self.get(name, self.__unset_attribute_value__) - if value is self.__unset_attribute_value__: - raise ApiAttributeError( - "{0} has no attribute '{1}'".format( - type(self).__name__, name), - [e for e in [self._path_to_item, name] if e] - ) - return value - - def __contains__(self, name): - """used by `in` operator to check if an attribute value was set in an instance: `'attr' in instance`""" - - if name in self.required_properties: - return name in self.__dict__ - - model_instances = self._var_name_to_model_instances.get( - name, self._additional_properties_model_instances) - - if model_instances: - for model_instance in model_instances: - if name in model_instance._data_store: - return True - - return False - - def to_dict(self): - """Returns the model properties as a dict""" - return model_to_dict(self, serialize=False) - - def to_str(self): - """Returns the string representation of the model""" - return pprint.pformat(self.to_dict()) - - def __eq__(self, other): - """Returns true if both objects are equal""" - if not isinstance(other, self.__class__): - return False - - if not set(self._data_store.keys()) == set(other._data_store.keys()): - return False - for _var_name, this_val in self._data_store.items(): - that_val = other._data_store[_var_name] - types = set() - types.add(this_val.__class__) - types.add(that_val.__class__) - vals_equal = this_val == that_val - if not vals_equal: - return False - return True - - -COERCION_INDEX_BY_TYPE = { - ModelComposed: 0, - ModelNormal: 1, - ModelSimple: 2, - none_type: 3, # The type of 'None'. - list: 4, - dict: 5, - float: 6, - int: 7, - bool: 8, - datetime: 9, - date: 10, - str: 11, - file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type. -} - -# these are used to limit what type conversions we try to do -# when we have a valid type already and we want to try converting -# to another type -UPCONVERSION_TYPE_PAIRS = ( - (str, datetime), - (str, date), - # A float may be serialized as an integer, e.g. '3' is a valid serialized float. - (int, float), - (list, ModelComposed), - (dict, ModelComposed), - (str, ModelComposed), - (int, ModelComposed), - (float, ModelComposed), - (list, ModelComposed), - (list, ModelNormal), - (dict, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), -) - -COERCIBLE_TYPE_PAIRS = { - False: ( # client instantiation of a model with client data - # (dict, ModelComposed), - # (list, ModelComposed), - # (dict, ModelNormal), - # (list, ModelNormal), - # (str, ModelSimple), - # (int, ModelSimple), - # (float, ModelSimple), - # (list, ModelSimple), - # (str, int), - # (str, float), - # (str, datetime), - # (str, date), - # (int, str), - # (float, str), - ), - True: ( # server -> client data - (dict, ModelComposed), - (list, ModelComposed), - (dict, ModelNormal), - (list, ModelNormal), - (str, ModelSimple), - (int, ModelSimple), - (float, ModelSimple), - (list, ModelSimple), - # (str, int), - # (str, float), - (str, datetime), - (str, date), - # (int, str), - # (float, str), - (str, file_type) - ), -} - - -def get_simple_class(input_value): - """Returns an input_value's simple class that we will use for type checking - Python2: - float and int will return int, where int is the python3 int backport - str and unicode will return str, where str is the python3 str backport - Note: float and int ARE both instances of int backport - Note: str_py2 and unicode_py2 are NOT both instances of str backport - - Args: - input_value (class/class_instance): the item for which we will return - the simple class - """ - if isinstance(input_value, type): - # input_value is a class - return input_value - elif isinstance(input_value, tuple): - return tuple - elif isinstance(input_value, list): - return list - elif isinstance(input_value, dict): - return dict - elif isinstance(input_value, none_type): - return none_type - elif isinstance(input_value, file_type): - return file_type - elif isinstance(input_value, bool): - # this must be higher than the int check because - # isinstance(True, int) == True - return bool - elif isinstance(input_value, int): - return int - elif isinstance(input_value, datetime): - # this must be higher than the date check because - # isinstance(datetime_instance, date) == True - return datetime - elif isinstance(input_value, date): - return date - elif isinstance(input_value, str): - return str - return type(input_value) - - -def check_allowed_values(allowed_values, input_variable_path, input_values): - """Raises an exception if the input_values are not allowed - - Args: - allowed_values (dict): the allowed_values dict - input_variable_path (tuple): the path to the input variable - input_values (list/str/int/float/date/datetime): the values that we - are checking to see if they are in allowed_values - """ - these_allowed_values = list(allowed_values[input_variable_path].values()) - if (isinstance(input_values, list) - and not set(input_values).issubset( - set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values) - set(these_allowed_values))), - raise ApiValueError( - "Invalid values for `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (isinstance(input_values, dict) - and not set( - input_values.keys()).issubset(set(these_allowed_values))): - invalid_values = ", ".join( - map(str, set(input_values.keys()) - set(these_allowed_values))) - raise ApiValueError( - "Invalid keys in `%s` [%s], must be a subset of [%s]" % - ( - input_variable_path[0], - invalid_values, - ", ".join(map(str, these_allowed_values)) - ) - ) - elif (not isinstance(input_values, (list, dict)) - and input_values not in these_allowed_values): - raise ApiValueError( - "Invalid value for `%s` (%s), must be one of %s" % - ( - input_variable_path[0], - input_values, - these_allowed_values - ) - ) - - -def is_json_validation_enabled(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - -def check_validations( - validations, input_variable_path, input_values, - configuration=None): - """Raises an exception if the input_values are invalid - - Args: - validations (dict): the validation dictionary. - input_variable_path (tuple): the path to the input variable. - input_values (list/str/int/float/date/datetime): the values that we - are checking. - configuration (Configuration): the configuration class. - """ - - if input_values is None: - return - - current_validations = validations[input_variable_path] - if (is_json_validation_enabled('multipleOf', configuration) and - 'multiple_of' in current_validations and - isinstance(input_values, (int, float)) and - not (float(input_values) / current_validations['multiple_of']).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - raise ApiValueError( - "Invalid value for `%s`, value must be a multiple of " - "`%s`" % ( - input_variable_path[0], - current_validations['multiple_of'] - ) - ) - - if (is_json_validation_enabled('maxLength', configuration) and - 'max_length' in current_validations and - len(input_values) > current_validations['max_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['max_length'] - ) - ) - - if (is_json_validation_enabled('minLength', configuration) and - 'min_length' in current_validations and - len(input_values) < current_validations['min_length']): - raise ApiValueError( - "Invalid value for `%s`, length must be greater than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['min_length'] - ) - ) - - if (is_json_validation_enabled('maxItems', configuration) and - 'max_items' in current_validations and - len(input_values) > current_validations['max_items']): - raise ApiValueError( - "Invalid value for `%s`, number of items must be less than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['max_items'] - ) - ) - - if (is_json_validation_enabled('minItems', configuration) and - 'min_items' in current_validations and - len(input_values) < current_validations['min_items']): - raise ValueError( - "Invalid value for `%s`, number of items must be greater than or " - "equal to `%s`" % ( - input_variable_path[0], - current_validations['min_items'] - ) - ) - - items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum', - 'inclusive_minimum') - if (any(item in current_validations for item in items)): - if isinstance(input_values, list): - max_val = max(input_values) - min_val = min(input_values) - elif isinstance(input_values, dict): - max_val = max(input_values.values()) - min_val = min(input_values.values()) - else: - max_val = input_values - min_val = input_values - - if (is_json_validation_enabled('exclusiveMaximum', configuration) and - 'exclusive_maximum' in current_validations and - max_val >= current_validations['exclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than `%s`" % ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('maximum', configuration) and - 'inclusive_maximum' in current_validations and - max_val > current_validations['inclusive_maximum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value less than or equal to " - "`%s`" % ( - input_variable_path[0], - current_validations['inclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('exclusiveMinimum', configuration) and - 'exclusive_minimum' in current_validations and - min_val <= current_validations['exclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than `%s`" % - ( - input_variable_path[0], - current_validations['exclusive_maximum'] - ) - ) - - if (is_json_validation_enabled('minimum', configuration) and - 'inclusive_minimum' in current_validations and - min_val < current_validations['inclusive_minimum']): - raise ApiValueError( - "Invalid value for `%s`, must be a value greater than or equal " - "to `%s`" % ( - input_variable_path[0], - current_validations['inclusive_minimum'] - ) - ) - flags = current_validations.get('regex', {}).get('flags', 0) - if (is_json_validation_enabled('pattern', configuration) and - 'regex' in current_validations and - not re.search(current_validations['regex']['pattern'], - input_values, flags=flags)): - err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % ( - input_variable_path[0], - current_validations['regex']['pattern'] - ) - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - err_msg = r"%s with flags=`%s`" % (err_msg, flags) - raise ApiValueError(err_msg) - - -def order_response_types(required_types): - """Returns the required types sorted in coercion order - - Args: - required_types (list/tuple): collection of classes or instance of - list or dict with class information inside it. - - Returns: - (list): coercion order sorted collection of classes or instance - of list or dict with class information inside it. - """ - - def index_getter(class_or_instance): - if isinstance(class_or_instance, list): - return COERCION_INDEX_BY_TYPE[list] - elif isinstance(class_or_instance, dict): - return COERCION_INDEX_BY_TYPE[dict] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelComposed)): - return COERCION_INDEX_BY_TYPE[ModelComposed] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelNormal)): - return COERCION_INDEX_BY_TYPE[ModelNormal] - elif (inspect.isclass(class_or_instance) - and issubclass(class_or_instance, ModelSimple)): - return COERCION_INDEX_BY_TYPE[ModelSimple] - elif class_or_instance in COERCION_INDEX_BY_TYPE: - return COERCION_INDEX_BY_TYPE[class_or_instance] - raise ApiValueError("Unsupported type: %s" % class_or_instance) - - sorted_types = sorted( - required_types, - key=lambda class_or_instance: index_getter(class_or_instance) - ) - return sorted_types - - -def remove_uncoercible(required_types_classes, current_item, spec_property_naming, - must_convert=True): - """Only keeps the type conversions that are possible - - Args: - required_types_classes (tuple): tuple of classes that are required - these should be ordered by COERCION_INDEX_BY_TYPE - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - current_item (any): the current item (input data) to be converted - - Keyword Args: - must_convert (bool): if True the item to convert is of the wrong - type and we want a big list of coercibles - if False, we want a limited list of coercibles - - Returns: - (list): the remaining coercible required types, classes only - """ - current_type_simple = get_simple_class(current_item) - - results_classes = [] - for required_type_class in required_types_classes: - # convert our models to OpenApiModel - required_type_class_simplified = required_type_class - if isinstance(required_type_class_simplified, type): - if issubclass(required_type_class_simplified, ModelComposed): - required_type_class_simplified = ModelComposed - elif issubclass(required_type_class_simplified, ModelNormal): - required_type_class_simplified = ModelNormal - elif issubclass(required_type_class_simplified, ModelSimple): - required_type_class_simplified = ModelSimple - - if required_type_class_simplified == current_type_simple: - # don't consider converting to one's own class - continue - - class_pair = (current_type_simple, required_type_class_simplified) - if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]: - results_classes.append(required_type_class) - elif class_pair in UPCONVERSION_TYPE_PAIRS: - results_classes.append(required_type_class) - return results_classes - - -def get_discriminated_classes(cls): - """ - Returns all the classes that a discriminator converts to - TODO: lru_cache this - """ - possible_classes = [] - key = list(cls.discriminator.keys())[0] - if is_type_nullable(cls): - possible_classes.append(cls) - for discr_cls in cls.discriminator[key].values(): - if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None: - possible_classes.extend(get_discriminated_classes(discr_cls)) - else: - possible_classes.append(discr_cls) - return possible_classes - - -def get_possible_classes(cls, from_server_context): - # TODO: lru_cache this - possible_classes = [cls] - if from_server_context: - return possible_classes - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - possible_classes = [] - possible_classes.extend(get_discriminated_classes(cls)) - elif issubclass(cls, ModelComposed): - possible_classes.extend(composed_model_input_classes(cls)) - return possible_classes - - -def get_required_type_classes(required_types_mixed, spec_property_naming): - """Converts the tuple required_types into a tuple and a dict described - below - - Args: - required_types_mixed (tuple/list): will contain either classes or - instance of list or dict - spec_property_naming (bool): if True these values came from the - server, and we use the data types in our endpoints. - If False, we are client side and we need to include - oneOf and discriminator classes inside the data types in our endpoints - - Returns: - (valid_classes, dict_valid_class_to_child_types_mixed): - valid_classes (tuple): the valid classes that the current item - should be - dict_valid_class_to_child_types_mixed (dict): - valid_class (class): this is the key - child_types_mixed (list/dict/tuple): describes the valid child - types - """ - valid_classes = [] - child_req_types_by_current_type = {} - for required_type in required_types_mixed: - if isinstance(required_type, list): - valid_classes.append(list) - child_req_types_by_current_type[list] = required_type - elif isinstance(required_type, tuple): - valid_classes.append(tuple) - child_req_types_by_current_type[tuple] = required_type - elif isinstance(required_type, dict): - valid_classes.append(dict) - child_req_types_by_current_type[dict] = required_type[str] - else: - valid_classes.extend(get_possible_classes(required_type, spec_property_naming)) - return tuple(valid_classes), child_req_types_by_current_type - - -def change_keys_js_to_python(input_dict, model_class): - """ - Converts from javascript_key keys in the input_dict to python_keys in - the output dict using the mapping in model_class. - If the input_dict contains a key which does not declared in the model_class, - the key is added to the output dict as is. The assumption is the model_class - may have undeclared properties (additionalProperties attribute in the OAS - document). - """ - - if getattr(model_class, 'attribute_map', None) is None: - return input_dict - output_dict = {} - reversed_attr_map = {value: key for key, value in - model_class.attribute_map.items()} - for javascript_key, value in input_dict.items(): - python_key = reversed_attr_map.get(javascript_key) - if python_key is None: - # if the key is unknown, it is in error or it is an - # additionalProperties variable - python_key = javascript_key - output_dict[python_key] = value - return output_dict - - -def get_type_error(var_value, path_to_item, valid_classes, key_type=False): - error_msg = type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type - ) - - -def deserialize_primitive(data, klass, path_to_item): - """Deserializes string to primitive type. - - :param data: str/int/float - :param klass: str/class the class to convert to - - :return: int, float, str, bool, date, datetime - """ - additional_message = "" - try: - if klass in {datetime, date}: - additional_message = ( - "If you need your parameter to have a fallback " - "string value, please set its type as `type: {}` in your " - "spec. That allows the value to be any type. " - ) - if klass == datetime: - if len(data) < 8: - raise ValueError("This is not a datetime") - # The string should be in iso8601 datetime format. - parsed_datetime = parse(data) - date_only = ( - parsed_datetime.hour == 0 and - parsed_datetime.minute == 0 and - parsed_datetime.second == 0 and - parsed_datetime.tzinfo is None and - 8 <= len(data) <= 10 - ) - if date_only: - raise ValueError("This is a date, not a datetime") - return parsed_datetime - elif klass == date: - if len(data) < 8: - raise ValueError("This is not a date") - return parse(data).date() - else: - converted_value = klass(data) - if isinstance(data, str) and klass == float: - if str(converted_value) != data: - # '7' -> 7.0 -> '7.0' != '7' - raise ValueError('This is not a float') - return converted_value - except (OverflowError, ValueError) as ex: - # parse can raise OverflowError - raise ApiValueError( - "{0}Failed to parse {1} as {2}".format( - additional_message, repr(data), klass.__name__ - ), - path_to_item=path_to_item - ) from ex - - -def get_discriminator_class(model_class, - discr_name, - discr_value, cls_visited): - """Returns the child class specified by the discriminator. - - Args: - model_class (OpenApiModel): the model class. - discr_name (string): the name of the discriminator property. - discr_value (any): the discriminator value. - cls_visited (list): list of model classes that have been visited. - Used to determine the discriminator class without - visiting circular references indefinitely. - - Returns: - used_model_class (class/None): the chosen child class that will be used - to deserialize the data, for example dog.Dog. - If a class is not found, None is returned. - """ - - if model_class in cls_visited: - # The class has already been visited and no suitable class was found. - return None - cls_visited.append(model_class) - used_model_class = None - if discr_name in model_class.discriminator: - class_name_to_discr_class = model_class.discriminator[discr_name] - used_model_class = class_name_to_discr_class.get(discr_value) - if used_model_class is None: - # We didn't find a discriminated class in class_name_to_discr_class. - # So look in the ancestor or descendant discriminators - # The discriminator mapping may exist in a descendant (anyOf, oneOf) - # or ancestor (allOf). - # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat - # hierarchy, the discriminator mappings may be defined at any level - # in the hierarchy. - # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig - # if we try to make BasquePig from mammal, we need to travel through - # the oneOf descendant discriminators to find BasquePig - descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \ - model_class._composed_schemas.get('anyOf', ()) - ancestor_classes = model_class._composed_schemas.get('allOf', ()) - possible_classes = descendant_classes + ancestor_classes - for cls in possible_classes: - # Check if the schema has inherited discriminators. - if hasattr(cls, 'discriminator') and cls.discriminator is not None: - used_model_class = get_discriminator_class( - cls, discr_name, discr_value, cls_visited) - if used_model_class is not None: - return used_model_class - return used_model_class - - -def deserialize_model(model_data, model_class, path_to_item, check_type, - configuration, spec_property_naming): - """Deserializes model_data to model instance. - - Args: - model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model - model_class (OpenApiModel): the model class - path_to_item (list): path to the model in the received data - check_type (bool): whether to check the data tupe for the values in - the model - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - - Returns: - model instance - - Raise: - ApiTypeError - ApiValueError - ApiKeyError - """ - - kw_args = dict(_check_type=check_type, - _path_to_item=path_to_item, - _configuration=configuration, - _spec_property_naming=spec_property_naming) - - if issubclass(model_class, ModelSimple): - return model_class._new_from_openapi_data(model_data, **kw_args) - elif isinstance(model_data, list): - return model_class._new_from_openapi_data(*model_data, **kw_args) - if isinstance(model_data, dict): - kw_args.update(model_data) - return model_class._new_from_openapi_data(**kw_args) - elif isinstance(model_data, PRIMITIVE_TYPES): - return model_class._new_from_openapi_data(model_data, **kw_args) - - -def deserialize_file(response_data, configuration, content_disposition=None): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - Args: - param response_data (str): the file data to write - configuration (Configuration): the instance to use to convert files - - Keyword Args: - content_disposition (str): the value of the Content-Disposition - header - - Returns: - (file_type): the deserialized file which is open - The user is responsible for closing and reading the file - """ - fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - if content_disposition: - filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition, - flags=re.I) - if filename is not None: - filename = filename.group(1) - else: - filename = "default_" + str(uuid.uuid4()) - - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - if isinstance(response_data, str): - # change str to bytes so we can write it - response_data = response_data.encode('utf-8') - f.write(response_data) - - f = open(path, "rb") - return f - - -def attempt_convert_item(input_value, valid_classes, path_to_item, - configuration, spec_property_naming, key_type=False, - must_convert=False, check_type=True): - """ - Args: - input_value (any): the data to convert - valid_classes (any): the classes that are valid - path_to_item (list): the path to the item to convert - configuration (Configuration): the instance to use to convert files - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - key_type (bool): if True we need to convert a key type (not supported) - must_convert (bool): if True we must convert - check_type (bool): if True we check the type or the returned data in - ModelComposed/ModelNormal/ModelSimple instances - - Returns: - instance (any) the fixed item - - Raises: - ApiTypeError - ApiValueError - ApiKeyError - """ - valid_classes_ordered = order_response_types(valid_classes) - valid_classes_coercible = remove_uncoercible( - valid_classes_ordered, input_value, spec_property_naming) - if not valid_classes_coercible or key_type: - # we do not handle keytype errors, json will take care - # of this for us - if configuration is None or not configuration.discard_unknown_keys: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=key_type) - for valid_class in valid_classes_coercible: - try: - if issubclass(valid_class, OpenApiModel): - return deserialize_model(input_value, valid_class, - path_to_item, check_type, - configuration, spec_property_naming) - elif valid_class == file_type: - return deserialize_file(input_value, configuration) - return deserialize_primitive(input_value, valid_class, - path_to_item) - except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc: - if must_convert: - raise conversion_exc - # if we have conversion errors when must_convert == False - # we ignore the exception and move on to the next class - continue - # we were unable to convert, must_convert == False - return input_value - - -def is_type_nullable(input_type): - """ - Returns true if None is an allowed value for the specified input_type. - - A type is nullable if at least one of the following conditions is true: - 1. The OAS 'nullable' attribute has been specified, - 1. The type is the 'null' type, - 1. The type is a anyOf/oneOf composed schema, and a child schema is - the 'null' type. - Args: - input_type (type): the class of the input_value that we are - checking - Returns: - bool - """ - if input_type is none_type: - return True - if issubclass(input_type, OpenApiModel) and input_type._nullable: - return True - if issubclass(input_type, ModelComposed): - # If oneOf/anyOf, check if the 'null' type is one of the allowed types. - for t in input_type._composed_schemas.get('oneOf', ()): - if is_type_nullable(t): - return True - for t in input_type._composed_schemas.get('anyOf', ()): - if is_type_nullable(t): - return True - return False - - -def is_valid_type(input_class_simple, valid_classes): - """ - Args: - input_class_simple (class): the class of the input_value that we are - checking - valid_classes (tuple): the valid classes that the current item - should be - Returns: - bool - """ - if issubclass(input_class_simple, OpenApiModel) and \ - valid_classes == (bool, date, datetime, dict, float, int, list, str, none_type,): - return True - valid_type = input_class_simple in valid_classes - if not valid_type and ( - issubclass(input_class_simple, OpenApiModel) or - input_class_simple is none_type): - for valid_class in valid_classes: - if input_class_simple is none_type and is_type_nullable(valid_class): - # Schema is oneOf/anyOf and the 'null' type is one of the allowed types. - return True - if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator): - continue - discr_propertyname_py = list(valid_class.discriminator.keys())[0] - discriminator_classes = ( - valid_class.discriminator[discr_propertyname_py].values() - ) - valid_type = is_valid_type(input_class_simple, discriminator_classes) - if valid_type: - return True - return valid_type - - -def validate_and_convert_types(input_value, required_types_mixed, path_to_item, - spec_property_naming, _check_type, configuration=None): - """Raises a TypeError is there is a problem, otherwise returns value - - Args: - input_value (any): the data to validate/convert - required_types_mixed (list/dict/tuple): A list of - valid classes, or a list tuples of valid classes, or a dict where - the value is a tuple of value classes - path_to_item: (list) the path to the data being validated - this stores a list of keys or indices to get to the data being - validated - spec_property_naming (bool): True if the variable names in the input - data are serialized names as specified in the OpenAPI document. - False if the variables names in the input data are python - variable names in PEP-8 snake case. - _check_type: (boolean) if true, type will be checked and conversion - will be attempted. - configuration: (Configuration): the configuration class to use - when converting file_type items. - If passed, conversion will be attempted when possible - If not passed, no conversions will be attempted and - exceptions will be raised - - Returns: - the correctly typed value - - Raises: - ApiTypeError - """ - results = get_required_type_classes(required_types_mixed, spec_property_naming) - valid_classes, child_req_types_by_current_type = results - - input_class_simple = get_simple_class(input_value) - valid_type = is_valid_type(input_class_simple, valid_classes) - if not valid_type: - if (configuration - or (input_class_simple == dict - and dict not in valid_classes)): - # if input_value is not valid_type try to convert it - converted_instance = attempt_convert_item( - input_value, - valid_classes, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=True, - check_type=_check_type - ) - return converted_instance - else: - raise get_type_error(input_value, path_to_item, valid_classes, - key_type=False) - - # input_value's type is in valid_classes - if len(valid_classes) > 1 and configuration: - # there are valid classes which are not the current class - valid_classes_coercible = remove_uncoercible( - valid_classes, input_value, spec_property_naming, must_convert=False) - if valid_classes_coercible: - converted_instance = attempt_convert_item( - input_value, - valid_classes_coercible, - path_to_item, - configuration, - spec_property_naming, - key_type=False, - must_convert=False, - check_type=_check_type - ) - return converted_instance - - if child_req_types_by_current_type == {}: - # all types are of the required types and there are no more inner - # variables left to look at - return input_value - inner_required_types = child_req_types_by_current_type.get( - type(input_value) - ) - if inner_required_types is None: - # for this type, there are not more inner variables left to look at - return input_value - if isinstance(input_value, list): - if input_value == []: - # allow an empty list - return input_value - for index, inner_value in enumerate(input_value): - inner_path = list(path_to_item) - inner_path.append(index) - input_value[index] = validate_and_convert_types( - inner_value, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - elif isinstance(input_value, dict): - if input_value == {}: - # allow an empty dict - return input_value - for inner_key, inner_val in input_value.items(): - inner_path = list(path_to_item) - inner_path.append(inner_key) - if get_simple_class(inner_key) != str: - raise get_type_error(inner_key, inner_path, valid_classes, - key_type=True) - input_value[inner_key] = validate_and_convert_types( - inner_val, - inner_required_types, - inner_path, - spec_property_naming, - _check_type, - configuration=configuration - ) - return input_value - - -def model_to_dict(model_instance, serialize=True): - """Returns the model properties as a dict - - Args: - model_instance (one of your model instances): the model instance that - will be converted to a dict. - - Keyword Args: - serialize (bool): if True, the keys in the dict will be values from - attribute_map - """ - result = {} - - def extract_item(item): return ( - item[0], model_to_dict( - item[1], serialize=serialize)) if hasattr( - item[1], '_data_store') else item - - model_instances = [model_instance] - if model_instance._composed_schemas: - model_instances.extend(model_instance._composed_instances) - seen_json_attribute_names = set() - used_fallback_python_attribute_names = set() - py_to_json_map = {} - for model_instance in model_instances: - for attr, value in model_instance._data_store.items(): - if serialize: - # we use get here because additional property key names do not - # exist in attribute_map - try: - attr = model_instance.attribute_map[attr] - py_to_json_map.update(model_instance.attribute_map) - seen_json_attribute_names.add(attr) - except KeyError: - used_fallback_python_attribute_names.add(attr) - if isinstance(value, list): - if not value: - # empty list or None - result[attr] = value - else: - res = [] - for v in value: - if isinstance(v, PRIMITIVE_TYPES) or v is None: - res.append(v) - elif isinstance(v, ModelSimple): - res.append(v.value) - elif isinstance(v, dict): - res.append(dict(map( - extract_item, - v.items() - ))) - else: - res.append(model_to_dict(v, serialize=serialize)) - result[attr] = res - elif isinstance(value, dict): - result[attr] = dict(map( - extract_item, - value.items() - )) - elif isinstance(value, ModelSimple): - result[attr] = value.value - elif hasattr(value, '_data_store'): - result[attr] = model_to_dict(value, serialize=serialize) - else: - result[attr] = value - if serialize: - for python_key in used_fallback_python_attribute_names: - json_key = py_to_json_map.get(python_key) - if json_key is None: - continue - if python_key == json_key: - continue - json_key_assigned_no_need_for_python_key = json_key in seen_json_attribute_names - if json_key_assigned_no_need_for_python_key: - del result[python_key] - - return result - - -def type_error_message(var_value=None, var_name=None, valid_classes=None, - key_type=None): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - """ - key_or_value = 'value' - if key_type: - key_or_value = 'key' - valid_classes_phrase = get_valid_classes_phrase(valid_classes) - msg = ( - "Invalid type for variable '{0}'. Required {1} type {2} and " - "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - ) - return msg - - -def get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed - """ - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return 'is {0}'.format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - -def get_allof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - used to make instances - constant_args (dict): - metadata arguments: - _check_type - _path_to_item - _spec_property_naming - _configuration - _visited_composed_classes - - Returns - composed_instances (list) - """ - composed_instances = [] - for allof_class in self._composed_schemas['allOf']: - - try: - if constant_args.get('_spec_property_naming'): - allof_instance = allof_class._from_openapi_data(**model_args, **constant_args) - else: - allof_instance = allof_class(**model_args, **constant_args) - composed_instances.append(allof_instance) - except Exception as ex: - raise ApiValueError( - "Invalid inputs given to generate an instance of '%s'. The " - "input data was invalid for the allOf schema '%s' in the composed " - "schema '%s'. Error=%s" % ( - allof_class.__name__, - allof_class.__name__, - self.__class__.__name__, - str(ex) - ) - ) from ex - return composed_instances - - -def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None): - """ - Find the oneOf schema that matches the input data (e.g. payload). - If exactly one schema matches the input data, an instance of that schema - is returned. - If zero or more than one schema match the input data, an exception is raised. - In OAS 3.x, the payload MUST, by validation, match exactly one of the - schemas described by oneOf. - - Args: - cls: the class we are handling - model_kwargs (dict): var_name to var_value - The input data, e.g. the payload that must match a oneOf schema - in the OpenAPI document. - constant_kwargs (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Kwargs: - model_arg: (int, float, bool, str, date, datetime, ModelSimple, None): - the value to assign to a primitive class or ModelSimple class - Notes: - - this is only passed in when oneOf includes types which are not object - - None is used to suppress handling of model_arg, nullable models are handled in __new__ - - Returns - oneof_instance (instance) - """ - if len(cls._composed_schemas['oneOf']) == 0: - return None - - oneof_instances = [] - # Iterate over each oneOf schema and determine if the input data - # matches the oneOf schemas. - for oneof_class in cls._composed_schemas['oneOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if oneof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - single_value_input = allows_single_value_input(oneof_class) - - try: - if not single_value_input: - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - **model_kwargs, **constant_kwargs) - else: - oneof_instance = oneof_class(**model_kwargs, **constant_kwargs) - else: - if issubclass(oneof_class, ModelSimple): - if constant_kwargs.get('_spec_property_naming'): - oneof_instance = oneof_class._from_openapi_data( - model_arg, **constant_kwargs) - else: - oneof_instance = oneof_class(model_arg, **constant_kwargs) - elif oneof_class in PRIMITIVE_TYPES: - oneof_instance = validate_and_convert_types( - model_arg, - (oneof_class,), - constant_kwargs['_path_to_item'], - constant_kwargs['_spec_property_naming'], - constant_kwargs['_check_type'], - configuration=constant_kwargs['_configuration'] - ) - oneof_instances.append(oneof_instance) - except Exception: - pass - if len(oneof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None " - "of the oneOf schemas matched the input data." % - cls.__name__ - ) - elif len(oneof_instances) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. Multiple " - "oneOf schemas matched the inputs, but a max of one is allowed." % - cls.__name__ - ) - return oneof_instances[0] - - -def get_anyof_instances(self, model_args, constant_args): - """ - Args: - self: the class we are handling - model_args (dict): var_name to var_value - The input data, e.g. the payload that must match at least one - anyOf child schema in the OpenAPI document. - constant_args (dict): var_name to var_value - args that every model requires, including configuration, server - and path to item. - - Returns - anyof_instances (list) - """ - anyof_instances = [] - if len(self._composed_schemas['anyOf']) == 0: - return anyof_instances - - for anyof_class in self._composed_schemas['anyOf']: - # The composed oneOf schema allows the 'null' type and the input data - # is the null value. This is a OAS >= 3.1 feature. - if anyof_class is none_type: - # skip none_types because we are deserializing dict data. - # none_type deserialization is handled in the __new__ method - continue - - try: - if constant_args.get('_spec_property_naming'): - anyof_instance = anyof_class._from_openapi_data(**model_args, **constant_args) - else: - anyof_instance = anyof_class(**model_args, **constant_args) - anyof_instances.append(anyof_instance) - except Exception: - pass - if len(anyof_instances) == 0: - raise ApiValueError( - "Invalid inputs given to generate an instance of %s. None of the " - "anyOf schemas matched the inputs." % - self.__class__.__name__ - ) - return anyof_instances - - -def get_discarded_args(self, composed_instances, model_args): - """ - Gathers the args that were discarded by configuration.discard_unknown_keys - """ - model_arg_keys = model_args.keys() - discarded_args = set() - # arguments passed to self were already converted to python names - # before __init__ was called - for instance in composed_instances: - if instance.__class__ in self._composed_schemas['allOf']: - try: - keys = instance.to_dict().keys() - discarded_keys = model_args - keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - else: - try: - all_keys = set(model_to_dict(instance, serialize=False).keys()) - js_keys = model_to_dict(instance, serialize=True).keys() - all_keys.update(js_keys) - discarded_keys = model_arg_keys - all_keys - discarded_args.update(discarded_keys) - except Exception: - # allOf integer schema will throw exception - pass - return discarded_args - - -def validate_get_composed_info(constant_args, model_args, self): - """ - For composed schemas, generate schema instances for - all schemas in the oneOf/anyOf/allOf definition. If additional - properties are allowed, also assign those properties on - all matched schemas that contain additionalProperties. - Openapi schemas are python classes. - - Exceptions are raised if: - - 0 or > 1 oneOf schema matches the model_args input data - - no anyOf schema matches the model_args input data - - any of the allOf schemas do not match the model_args input data - - Args: - constant_args (dict): these are the args that every model requires - model_args (dict): these are the required and optional spec args that - were passed in to make this model - self (class): the class that we are instantiating - This class contains self._composed_schemas - - Returns: - composed_info (list): length three - composed_instances (list): the composed instances which are not - self - var_name_to_model_instances (dict): a dict going from var_name - to the model_instance which holds that var_name - the model_instance may be self or an instance of one of the - classes in self.composed_instances() - additional_properties_model_instances (list): a list of the - model instances which have the property - additional_properties_type. This list can include self - """ - # create composed_instances - composed_instances = [] - allof_instances = get_allof_instances(self, model_args, constant_args) - composed_instances.extend(allof_instances) - oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args) - if oneof_instance is not None: - composed_instances.append(oneof_instance) - anyof_instances = get_anyof_instances(self, model_args, constant_args) - composed_instances.extend(anyof_instances) - """ - set additional_properties_model_instances - additional properties must be evaluated at the schema level - so self's additional properties are most important - If self is a composed schema with: - - no properties defined in self - - additionalProperties: False - Then for object payloads every property is an additional property - and they are not allowed, so only empty dict is allowed - - Properties must be set on all matching schemas - so when a property is assigned toa composed instance, it must be set on all - composed instances regardless of additionalProperties presence - keeping it to prevent breaking changes in v5.0.1 - TODO remove cls._additional_properties_model_instances in 6.0.0 - """ - additional_properties_model_instances = [] - if self.additional_properties_type is not None: - additional_properties_model_instances = [self] - - """ - no need to set properties on self in here, they will be set in __init__ - By here all composed schema oneOf/anyOf/allOf instances have their properties set using - model_args - """ - discarded_args = get_discarded_args(self, composed_instances, model_args) - - # map variable names to composed_instances - var_name_to_model_instances = {} - for prop_name in model_args: - if prop_name not in discarded_args: - var_name_to_model_instances[prop_name] = [self] + list( - filter( - lambda x: prop_name in x.openapi_types, composed_instances)) - - return [ - composed_instances, - var_name_to_model_instances, - additional_properties_model_instances, - discarded_args - ] diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py deleted file mode 100644 index c69293a5b5d..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/models/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from dynamic_servers.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/__init__.py deleted file mode 100644 index b2acdc1cdc4..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from dynamic_servers.apis.path_to_api import path_to_api - -import enum - - -class PathValues(str, enum.Enum): - DEFAULT = "/default" - CUSTOM = "/custom" diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/__init__.py deleted file mode 100644 index fa96c95e723..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from dynamic_servers.paths.custom import Api - -from dynamic_servers.paths import PathValues - -path = PathValues.CUSTOM \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py deleted file mode 100644 index 2527c6a7a78..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from dynamic_servers import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from dynamic_servers import schemas # noqa: F401 - -from . import path - -_servers = ( - { - 'url': "https://{server}.swagger.io:{port}/v2", - 'description': "No description provided", - 'variables': { - 'server': { - 'description': "No description provided", - 'default_value': "custom-petstore", - 'enum_values': [ - "custom-petstore", - "custom-qa-petstore", - "custom-dev-petstore" - ] - }, - 'port': { - 'description': "No description provided", - 'default_value': "8080", - 'enum_values': [ - "80", - "8080" - ] - } - } - }, - { - 'url': "https://localhost:8081/{version}", - 'description': "The local custom server", - 'variables': { - 'version': { - 'description': "No description provided", - 'default_value': "v2", - 'enum_values': [ - "v1", - "v2", - "v3" - ] - } - } - }, - { - 'url': "https://third.example.com/{prefix}", - 'description': "The local custom server", - 'variables': { - 'prefix': { - 'description': "No description provided", - 'default_value': "custom", - } - } - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _custom_server_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use custom server - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - host = self._get_host_oapg('custom_server', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CustomServer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def custom_server( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._custom_server_oapg( - accept_content_types=accept_content_types, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._custom_server_oapg( - accept_content_types=accept_content_types, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi deleted file mode 100644 index 0e83c3bb015..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/custom/get.pyi +++ /dev/null @@ -1,249 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from dynamic_servers import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from dynamic_servers import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _custom_server_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _custom_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use custom server - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - host = self._get_host_oapg('custom_server', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CustomServer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def custom_server( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def custom_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._custom_server_oapg( - accept_content_types=accept_content_types, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._custom_server_oapg( - accept_content_types=accept_content_types, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/__init__.py deleted file mode 100644 index cb9e2d07e2f..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from dynamic_servers.paths.default import Api - -from dynamic_servers.paths import PathValues - -path = PathValues.DEFAULT \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py deleted file mode 100644 index 77d418754a5..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from dynamic_servers import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from dynamic_servers import schemas # noqa: F401 - -from . import path - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _default_server_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use default server - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DefaultServer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def default_server( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._default_server_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._default_server_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi deleted file mode 100644 index 8096393ca99..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/paths/default/get.pyi +++ /dev/null @@ -1,232 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from dynamic_servers import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from dynamic_servers import schemas # noqa: F401 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _default_server_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _default_server_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Use default server - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DefaultServer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def default_server( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def default_server( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._default_server_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._default_server_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/rest.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/rest.py deleted file mode 100644 index d8f522baab8..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/rest.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from dynamic_servers.exceptions import ApiException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - fields = fields or {} - headers = headers or {} - - if timeout: - if isinstance(timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - fields=fields, - encode_multipart=False, - preload_content=not stream, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py deleted file mode 100644 index 966644f4d95..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/schemas.py +++ /dev/null @@ -1,2475 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools -import decimal -import io -import re -import types -import typing -import uuid - -from dateutil.parser.isoparser import isoparser, _takes_ascii -import frozendict - -from dynamic_servers.exceptions import ( - ApiTypeError, - ApiValueError, -) -from dynamic_servers.configuration import ( - Configuration, -) - - -class Unset(object): - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset = Unset() - -none_type = type(None) -file_type = io.IOBase - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(_arg, (io.FileIO, io.BufferedReader)): - if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') - _arg.close() - inst = super(FileIO, cls).__new__(cls, _arg.name) - super(FileIO, inst).__init__(_arg.name) - return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') - - def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): - pass - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is defaultdict(set) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k] = d[k] | v - - -class ValidationMetadata(frozendict.frozendict): - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - def __new__( - cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), - from_server: bool = False, - configuration: typing.Optional[Configuration] = None, - seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() - ): - """ - Args: - path_to_item: the path to the current data being instantiated. - For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) - This changes from location to location - from_server: whether or not this data came form the server - True when receiving server data - False when instantiating model with client side data not form the server - This does not change from location to location - configuration: the Configuration instance to use - This is needed because in Configuration: - - one can disable validation checking - This does not change from location to location - seen_classes: when deserializing data that matches multiple schemas, this is used to store - the schemas that have been traversed. This is used to stop processing when a cycle is seen. - This changes from location to location - validated_path_to_schemas: stores the already validated schema classes for a given path location - This does not change from location to location - """ - return super().__new__( - cls, - path_to_item=path_to_item, - from_server=from_server, - configuration=configuration, - seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas - ) - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) - validation_ran_earlier = validated_schemas and cls in validated_schemas - if validation_ran_earlier: - return True - if cls in self.seen_classes: - return True - return False - - @property - def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') - - @property - def from_server(self) -> bool: - return self.get('from_server') - - @property - def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') - - @property - def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') - - @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -class Singleton: - """ - Enums and singletons are the same - The same instance is returned for a given key of (cls, _arg) - """ - _instances = {} - - def __new__(cls, _arg: typing.Any, **kwargs): - """ - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, _arg, str(_arg)) - if key not in cls._instances: - if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): - inst = super().__new__(cls) - cls._instances[key] = inst - else: - cls._instances[key] = super().__new__(cls, _arg) - return cls._instances[key] - - def __repr__(self): - if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' - elif isinstance(self, BoolClass): - if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' - - -class classproperty: - - def __init__(self, fget): - self.fget = fget - - def __get__(self, owner_self, owner_cls): - return self.fget(owner_cls) - - -class NoneClass(Singleton): - @classproperty - def NONE(cls): - return cls(None) - - def __bool__(self) -> bool: - return False - - -class BoolClass(Singleton): - @classproperty - def TRUE(cls): - return cls(True) - - @classproperty - def FALSE(cls): - return cls(False) - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -class MetaOapgTyped: - exclusive_maximum: typing.Union[int, float] - inclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - max_items: int - min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - - - class properties: - # to hold object properties - pass - - additional_properties: typing.Optional[typing.Type['Schema']] - max_properties: int - min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] - max_length: int - min_length: int - items: typing.Type['Schema'] - - -class Schema: - """ - the base class of all swagger/openapi schemas/models - """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} - _types: typing.Set[typing.Type] - MetaOapg = MetaOapgTyped - - @staticmethod - def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: - if isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - return item_cls - - @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - @classmethod - def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): - error_msg = cls.__type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - Schema _validate_oapg - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - - Returns: - path_to_schemas: a map of path to schemas - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - base_class = type(arg) - if base_class not in cls._types: - raise cls.__get_type_error( - arg, - validation_metadata.path_to_item, - cls._types, - key_type=False, - ) - - path_to_schemas = {validation_metadata.path_to_item: set()} - path_to_schemas[validation_metadata.path_to_item].add(cls) - path_to_schemas[validation_metadata.path_to_item].add(base_class) - return path_to_schemas - - @staticmethod - def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] - ): - """ - Processes and mutates schema_classes - If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included - """ - if len(schema_classes) < 2: - return - if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: - schema_classes.remove(UnsetAnyTypeSchema) - x_schema = schema_type_classes & schema_classes - if not x_schema: - return - x_schema = x_schema.pop() - if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): - # needed to not have a mro error in get_new_class - schema_classes.remove(x_schema) - - @classmethod - def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: - """ - Make a new dynamic class and return an instance of that class - We are making an instance of cls, but instead of making cls - make a new class, new_cls - which includes dynamic bases including cls - return an instance of that new class - - Dict property + List Item Assignment Use cases: - 1. value is NOT an instance of the required schema class - the value is validated by _validate_oapg - _validate_oapg returns a key value pair - where the key is the path to the item, and the value will be the required manufactured class - made out of the matching schemas - 2. value is an instance of the correct schema type - the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type - for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas - and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned - because value is of the correct type, and validation was run earlier when the instance was created - """ - _path_to_schemas = {} - if validation_metadata.validation_ran_earlier(cls): - add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas = {} - for path, schema_classes in _path_to_schemas.items(): - """ - Use cases - 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - needs Singleton added - 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass - Singleton already added - 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - """ - cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) - inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) - chosen_schema_classes = schema_classes - inheritable_primitive_type - suffix = tuple(inheritable_primitive_type) - if enum_schema and suffix[0] not in {NoneClass, BoolClass}: - suffix = (Singleton,) + suffix - - used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) - path_to_schemas[path] = mfg_cls - - return path_to_schemas - - @classmethod - def _get_new_instance_without_conversion_oapg( - cls, - arg: typing.Any, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - # We have a Dynamic class and we are making an instance of it - if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): - properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, properties) - elif issubclass(cls, tuple) and issubclass(cls, ListBase): - items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, items) - """ - str = openapi str, date, and datetime - decimal.Decimal = openapi int and float - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return super(Schema, cls).__new__(cls, arg) - - @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Union[ - str, - date, - datetime, - int, - float, - decimal.Decimal, - bool, - None, - 'Schema', - dict, - frozendict.frozendict, - tuple, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - _configuration: typing.Optional[Configuration] - ): - """ - Schema from_openapi_data_oapg - """ - from_server = True - validated_path_to_schemas = {} - arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) - validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) - path_to_schemas = cls.__get_new_cls(arg, validation_metadata) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - - @staticmethod - def __remove_unsets(kwargs): - return {key: val for key, val in kwargs.items() if val is not unset} - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): - """ - Schema __new__ - - Args: - _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - _configuration: contains the Configuration that enables json schema validation keywords - like minItems, minLength etc - - Note: double underscores are used here because pycharm thinks that these variables - are instance properties if they are named normally :( - """ - __kwargs = cls.__remove_unsets(kwargs) - if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and _args and not isinstance(_args[0], dict): - __arg = _args[0] - else: - __arg = cls.__get_input_dict(*_args, **__kwargs) - __from_server = False - __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) - __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) - __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) - __new_cls = __path_to_schemas[__validation_metadata.path_to_item] - return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas - ) - - def __init__( - self, - *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] - ): - """ - this is needed to fix 'Unexpected argument' warning in pycharm - this code does nothing because all Schema instances are immutable - this means that all input data is passed into and used in new, and after the new instance is made - no new attributes are assigned and init is not used - """ - pass - -""" -import itertools -data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') -type_to_cls = { - 'None': 'NoneClass', - 'FrozenDict': 'frozendict.frozendict', - 'Tuple': 'tuple', - 'Str': 'str', - 'Decimal': 'decimal.Decimal', - 'Bool': 'BoolClass' -} -cls_tuples = [v for v in itertools.combinations(data_types, 5)] -typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] -for cls in typed_classes: - print(cls) -object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] -for cls in object_classes: - print(cls) -""" -if typing.TYPE_CHECKING: - # qty 1 - NoneMixin = NoneClass - FrozenDictMixin = frozendict.frozendict - TupleMixin = tuple - StrMixin = str - DecimalMixin = decimal.Decimal - BoolMixin = BoolClass - BytesMixin = bytes - FileMixin = FileIO - # qty 2 - class BinaryMixin(bytes, FileIO): - pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): - pass - class NoneTupleMixin(NoneClass, tuple): - pass - class NoneStrMixin(NoneClass, str): - pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): - pass - class NoneBoolMixin(NoneClass, BoolClass): - pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): - pass - class FrozenDictStrMixin(frozendict.frozendict, str): - pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): - pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): - pass - class TupleStrMixin(tuple, str): - pass - class TupleDecimalMixin(tuple, decimal.Decimal): - pass - class TupleBoolMixin(tuple, BoolClass): - pass - class StrDecimalMixin(str, decimal.Decimal): - pass - class StrBoolMixin(str, BoolClass): - pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): - pass - # qty 3 - class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): - pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): - pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): - pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): - pass - class NoneTupleStrMixin(NoneClass, tuple, str): - pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): - pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): - pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): - pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): - pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): - pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): - pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): - pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): - pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): - pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): - pass - class TupleStrBoolMixin(tuple, str, BoolClass): - pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): - pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): - pass - # qty 4 - class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): - pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): - pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): - pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): - pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): - pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): - pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): - pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): - pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): - pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): - pass - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): - pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): - pass -else: - # qty 1 - class NoneMixin: - _types = {NoneClass} - class FrozenDictMixin: - _types = {frozendict.frozendict} - class TupleMixin: - _types = {tuple} - class StrMixin: - _types = {str} - class DecimalMixin: - _types = {decimal.Decimal} - class BoolMixin: - _types = {BoolClass} - class BytesMixin: - _types = {bytes} - class FileMixin: - _types = {FileIO} - # qty 2 - class BinaryMixin: - _types = {bytes, FileIO} - class NoneFrozenDictMixin: - _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: - _types = {NoneClass, tuple} - class NoneStrMixin: - _types = {NoneClass, str} - class NoneDecimalMixin: - _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: - _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: - _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: - _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: - _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: - _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: - _types = {tuple, str} - class TupleDecimalMixin: - _types = {tuple, decimal.Decimal} - class TupleBoolMixin: - _types = {tuple, BoolClass} - class StrDecimalMixin: - _types = {str, decimal.Decimal} - class StrBoolMixin: - _types = {str, BoolClass} - class DecimalBoolMixin: - _types = {decimal.Decimal, BoolClass} - # qty 3 - class NoneFrozenDictTupleMixin: - _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: - _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: - _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: - _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: - _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: - _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: - _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: - _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: - _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: - _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: - _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: - _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: - _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: - _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: - _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: - _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: - _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: - _types = {str, decimal.Decimal, BoolClass} - # qty 4 - class NoneFrozenDictTupleStrMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: - _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: - _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: - _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: - _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: - _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: - _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: - _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: - _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} - - -class ValidatorBase: - @staticmethod - def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - Note: the suffix _oapg stands for openapi python (experimental) generator and - it has been added to prevent collisions with other methods and properties - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - @staticmethod - def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class EnumBase: - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - EnumBase _validate_oapg - Validates that arg is in the enum's allowed values - """ - try: - cls.MetaOapg.enum_value_to_name[arg] - except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class BoolBase: - def is_true_oapg(self) -> bool: - """ - A replacement for x is True - True if the instance is a BoolClass True Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) - - def is_false_oapg(self) -> bool: - """ - A replacement for x is False - True if the instance is a BoolClass False Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) is False - - -class NoneBase: - def is_none_oapg(self) -> bool: - """ - A replacement for x is None - True if the instance is a NoneClass None Singleton - """ - if issubclass(self.__class__, NoneClass): - return True - return False - - -class StrBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_str_oapg(self) -> str: - return self - - @property - def as_date_oapg(self) -> date: - raise Exception('not implemented') - - @property - def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') - - @property - def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') - - @property - def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') - - @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): - for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - StrBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, str): - cls.__check_str_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class UUIDBase: - @property - @functools.lru_cache() - def as_uuid_oapg(self) -> uuid.UUID: - return uuid.UUID(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - uuid.UUID(arg) - return True - except ValueError: - raise ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - UUIDBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class CustomIsoparser(isoparser): - - @_takes_ascii - def parse_isodatetime(self, dt_str): - components, pos = self._parse_isodate(dt_str) - if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) - else: - raise ValueError('String contains unknown ISO components') - - if len(components) > 3 and components[3] == 24: - components[3] = 0 - return datetime(*components) + timedelta(days=1) - - if len(components) <= 3: - raise ValueError('Value is not a datetime') - - return datetime(*components) - - @_takes_ascii - def parse_isodate(self, datestr): - components, pos = self._parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return date(*components) - - -DEFAULT_ISOPARSER = CustomIsoparser() - - -class DateBase: - @property - @functools.lru_cache() - def as_date_oapg(self) -> date: - return DEFAULT_ISOPARSER.parse_isodate(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodate(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - DateBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DateTimeBase: - @property - @functools.lru_cache() - def as_datetime_oapg(self) -> datetime: - return DEFAULT_ISOPARSER.parse_isodatetime(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodatetime(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DateTimeBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DecimalBase: - """ - A class for storing decimals that are sent over the wire as strings - These schemas must remain based on StrBase rather than NumberBase - because picking base classes must be deterministic - """ - - @property - @functools.lru_cache() - def as_decimal_oapg(self) -> decimal.Decimal: - return decimal.Decimal(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - decimal.Decimal(arg) - return True - except decimal.InvalidOperation: - raise ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DecimalBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class NumberBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - """ - Note: for some numbers like 9.0 they could be represented as an - integer but our code chooses to store them as - >>> Decimal('9.0').as_tuple() - DecimalTuple(sign=0, digits=(9, 0), exponent=-1) - so we can tell that the value came from a float and convert it back to a float - during later serialization - """ - if self.as_tuple().exponent < 0: - # this could be represented as an integer but should be represented as a float - # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') - self._as_int = int(self) - return self._as_int - - @property - def as_float_oapg(self) -> float: - try: - return self._as_float - except AttributeError: - if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') - self._as_float = float(self) - return self._as_float - - @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): - multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item - ) - - checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', - } - ) - if not checking_max_or_min_values: - return - - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - NumberBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, decimal.Decimal): - cls.__check_numeric_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class ListBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @classmethod - def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for items are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - list_items: the input list of items - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - - # if we have definitions for an items schema, use it - # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) - item_cls = cls._get_class_oapg(item_cls) - path_to_schemas = {} - for i, value in enumerate(list_items): - item_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): - unique_items = set(arg) - if len(arg) > len(unique_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - ListBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, tuple): - cls.__check_tuple_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, tuple): - return _path_to_schemas - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_items_oapg( - cls: 'Schema', - arg: typing.List[typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - ''' - ListBase _get_items_oapg - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return cast_items - - -class Discriminable: - MetaOapg: MetaOapgTyped - - @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): - if not args or args and disc_property_name not in args[0]: - # The input data does not contain the discriminator property - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - @classmethod - def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - if not hasattr(cls.MetaOapg, 'discriminator'): - return None - disc = cls.MetaOapg.discriminator() - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not hasattr(cls, 'MetaOapg'): - return None - elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): - for allof_cls in cls.MetaOapg.all_of(): - discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): - for oneof_cls in cls.MetaOapg.one_of(): - discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): - for anyof_cls in cls.MetaOapg.any_of(): - discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -class DictBase(Discriminable, ValidatorBase): - - @classmethod - def __validate_arg_presence(cls, arg): - """ - Ensures that: - - all required arguments are passed in - - the input variable names are valid - - present in properties or - - accepted because additionalProperties exists - Exceptions will be raised if: - - invalid arguments were passed in - - a var_name is invalid if additional_properties == NotAnyTypeSchema - and var_name not in properties.__annotations__ - - required properties were not passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - seen_required_properties = set() - invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name in arg: - if property_name in required_property_names: - seen_required_properties.add(property_name) - elif property_name in property_annotations: - continue - elif additional_properties is not NotAnyTypeSchema: - continue - else: - invalid_arguments.append(property_name) - missing_required_arguments = list(required_property_names - seen_required_properties) - if missing_required_arguments: - missing_required_arguments.sort() - raise ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - if invalid_arguments: - invalid_arguments.sort() - raise ApiTypeError( - "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments - ) - ) - - @classmethod - def __validate_args(cls, arg, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for properties are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) - if property_name in property_annotations: - schema = property_annotations[property_name] - elif additional_properties is not NotAnyTypeSchema: - if additional_properties is UnsetAnyTypeSchema: - """ - If additionalProperties is unset and this path_to_item does not yet have - any validations on it, validate it. - If it already has validations on it, skip this validation. - """ - if path_to_item in path_to_schemas: - continue - schema = additional_properties - else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) - schema = cls._get_class_oapg(schema) - arg_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DictBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, frozendict.frozendict): - cls.__check_dict_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, frozendict.frozendict): - return _path_to_schemas - cls.__validate_arg_presence(arg) - other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - try: - discriminator = cls.MetaOapg.discriminator() - except AttributeError: - return _path_to_schemas - # discriminator exists - disc_prop_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if updated_vm.validation_ran_earlier(discriminated_cls): - add_deeper_validated_schemas(updated_vm, _path_to_schemas) - return _path_to_schemas - other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_properties_oapg( - cls, - arg: typing.Dict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - """ - DictBase _get_properties_oapg, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return dict_items - - def __setattr__(self, name: str, value: typing.Any): - if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') - - def __getattr__(self, name: str): - """ - for instance.name access - Properties are only type hinted for required properties - so that hasattr(instance, 'optionalProp') is False when that key is not present - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - if name not in self.__class__.__annotations__: - raise AttributeError(f"{self} has no attribute '{name}'") - try: - value = self[name] - return value - except KeyError as ex: - raise AttributeError(str(ex)) - - def __getitem__(self, name: str): - """ - dict_instance[name] accessor - key errors thrown - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - return super().__getitem__(name) - - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: - # dict_instance[name] accessor - if not isinstance(self, frozendict.frozendict): - raise NotImplementedError() - try: - return super().__getitem__(name) - except KeyError: - return unset - - -def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), -) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - if isinstance(arg, Schema): - # store the already run validations - schema_classes = set() - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) - validated_path_to_schemas[path_to_item] = schema_classes - - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - return str(arg) - elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) - elif isinstance(arg, (bool, BoolClass)): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - if arg: - return BoolClass.TRUE - return BoolClass.FALSE - elif isinstance(arg, int): - return decimal.Decimal(arg) - elif isinstance(arg, float): - decimal_from_float = decimal.Decimal(arg) - if decimal_from_float.as_integer_ratio()[1] == 1: - # 9.0 -> Decimal('9.0') - # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') - return decimal_from_float - elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) - elif isinstance(arg, (none_type, NoneClass)): - return NoneClass.NONE - elif isinstance(arg, (date, datetime)): - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, decimal.Decimal): - return decimal.Decimal(arg) - elif isinstance(arg, bytes): - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class ComposedBase(Discriminable): - - @classmethod - def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): - path_to_schemas = defaultdict(set) - for allof_cls in cls.MetaOapg.all_of(): - if validation_metadata.validation_ran_earlier(allof_cls): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __get_oneof_class( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata, - ): - oneof_classes = [] - path_to_schemas = defaultdict(set) - for oneof_cls in cls.MetaOapg.one_of(): - if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(oneof_cls) - continue - if validation_metadata.validation_ran_earlier(oneof_cls): - oneof_classes.append(oneof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and oneof_cls is discriminated_cls: - raise ex - continue - oneof_classes.append(oneof_cls) - if not oneof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the oneOf schemas matched the input data.".format(cls) - ) - elif len(oneof_classes) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. Multiple " - "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) - ) - # exactly one class matches - return path_to_schemas - - @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): - anyof_classes = [] - path_to_schemas = defaultdict(set) - for anyof_cls in cls.MetaOapg.any_of(): - if validation_metadata.validation_ran_earlier(anyof_cls): - anyof_classes.append(anyof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and anyof_cls is discriminated_cls: - raise ex - continue - anyof_classes.append(anyof_cls) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - ComposedBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - # validation checking on types, validations, and enums - path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - - # process composed schema - discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): - discriminator = cls.MetaOapg.discriminator() - discriminated_cls = None - if discriminator and arg and isinstance(arg, frozendict.frozendict): - disc_property_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) - # get discriminated_cls by looking at the dict in the current class - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( - arg[disc_property_name], - cls.__name__, - disc_property_name, - list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) - ) - ) - - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): - other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): - other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): - other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): - not_cls = cls.MetaOapg.not_schema - not_cls = cls._get_class_oapg(not_cls) - if not_cls: - other_path_to_schemas = None - not_exception = ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_cls.__name__, - ) - ) - if updated_vm.validation_ran_earlier(not_cls): - raise not_exception - - try: - other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) - except (ApiValueError, ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - - if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): - # TODO use an exception from this package here - add_deeper_validated_schemas(updated_vm, path_to_schemas) - assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] - return path_to_schemas - - -# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase -class ComposedSchema( - ComposedBase, - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolMixin -): - @classmethod - def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): - if not args: - if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) - return super().from_openapi_data_oapg(args[0], _configuration=_configuration) - - -class ListSchema( - ListBase, - Schema, - TupleMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: None, **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class IntBase: - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - self._as_int = int(self) - return self._as_int - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - - denominator = arg.as_integer_ratio()[-1] - if denominator != 1: - raise ApiValueError( - "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - IntBase _validate_oapg - TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class IntSchema(IntBase, NumberSchema): - - @classmethod - def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class Int32Base: - __inclusive_minimum = decimal.Decimal(-2147483648) - __inclusive_maximum = decimal.Decimal(2147483647) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int32Schema( - Int32Base, - IntSchema -): - pass - - -class Int64Base: - __inclusive_minimum = decimal.Decimal(-9223372036854775808) - __inclusive_maximum = decimal.Decimal(9223372036854775807) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int64Schema( - Int64Base, - IntSchema -): - pass - - -class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Float32Schema( - Float32Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - -class Float64Schema( - Float64Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - # todo check format - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class StrSchema( - StrBase, - Schema, - StrMixin -): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class UUIDSchema(UUIDBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateSchema(DateBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateTimeSchema(DateTimeBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DecimalSchema(DecimalBase, StrSchema): - - def __new__(cls, _arg: str, **kwargs: Configuration): - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().__new__(cls, _arg, **kwargs) - - -class BytesSchema( - Schema, - BytesMixin -): - """ - this class will subclass bytes and is immutable - """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class FileSchema( - Schema, - FileMixin -): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class BinaryBase: - pass - - -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): - class MetaOapg: - @staticmethod - def one_of(): - return [ - BytesSchema, - FileSchema, - ] - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, _arg) - - -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, _arg, **kwargs) - - -class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin -): - # Python representation of a schema defined as true or {} - pass - - -class UnsetAnyTypeSchema(AnyTypeSchema): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - - -class NotAnyTypeSchema( - ComposedSchema, -): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - - class MetaOapg: - not_schema = AnyTypeSchema - - def __new__( - cls, - *_args, - _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *_args, **kwargs) - - -schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} - - -@functools.lru_cache() -def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] -) -> typing.Type[Schema]: - """ - Returns a new class that is made with the subclass bases - """ - new_cls: typing.Type[Schema] = type(class_name, bases, {}) - return new_cls - - -LOG_CACHE_USAGE = False - - -def log_cache_usage(cache_fn): - if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh b/samples/openapi3/client/features/dynamic-servers/python/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt b/samples/openapi3/client/features/dynamic-servers/python/requirements.txt deleted file mode 100644 index 3cb6612669d..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -python-dateutil ~= 2.7.0 -setuptools >= 21.0.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/features/dynamic-servers/python/setup.cfg b/samples/openapi3/client/features/dynamic-servers/python/setup.cfg deleted file mode 100644 index 11433ee875a..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/samples/openapi3/client/features/dynamic-servers/python/setup.py b/samples/openapi3/client/features/dynamic-servers/python/setup.py deleted file mode 100644 index 4c1b5437157..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/setup.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "dynamic-servers" -VERSION = "1.0.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "certifi >= 14.5.14", - "frozendict ~= 2.3.4", - "python-dateutil ~= 2.7.0", - "setuptools >= 21.0.0", - "typing_extensions ~= 4.3.0", - "urllib3 ~= 1.26.7", -] - -setup( - name=NAME, - version=VERSION, - description="OpenAPI Extension with dynamic servers", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Extension with dynamic servers"], - python_requires=">=3.7", - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - license="Apache-2.0", - long_description="""\ - This specification shows how to use dynamic servers. # noqa: E501 - """ -) diff --git a/samples/openapi3/client/features/dynamic-servers/python/test-requirements.txt b/samples/openapi3/client/features/dynamic-servers/python/test-requirements.txt deleted file mode 100644 index 2d88b034192..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_models/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_models/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/__init__.py deleted file mode 100644 index 1309632d3d5..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -import json -import typing - -import urllib3 -from urllib3._collections import HTTPHeaderDict - - -class ApiTestMixin: - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = None, - accept_content_type: typing.Optional[str] = None, - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/test_get.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/test_get.py deleted file mode 100644 index 5c1e563e348..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_custom/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import dynamic_servers -from dynamic_servers.paths.custom import get # noqa: E501 -from dynamic_servers import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestCustom(ApiTestMixin, unittest.TestCase): - """ - Custom unit test stubs - Use custom server # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/__init__.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/test_get.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/test_get.py deleted file mode 100644 index 7816dd50f22..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/test/test_paths/test_default/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import dynamic_servers -from dynamic_servers.paths.default import get # noqa: E501 -from dynamic_servers import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestDefault(ApiTestMixin, unittest.TestCase): - """ - Default unit test stubs - Use default server # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/features/dynamic-servers/python/test/test_usage_api.py b/samples/openapi3/client/features/dynamic-servers/python/test/test_usage_api.py deleted file mode 100644 index 9bca5cafb09..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/test/test_usage_api.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Extension with dynamic servers - - This specification shows how to use dynamic servers. # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import functools -import unittest - -import dynamic_servers -from dynamic_servers.api.usage_api import UsageApi # noqa: E501 - - -class TestUsageApi(unittest.TestCase): - """UsageApi unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_custom_server(self): - """Test case for custom_server - - Use custom server # noqa: E501 - """ - # expected value, config - servers = ( - ("https://custom-petstore.swagger.io:8080/v2/custom", {}), - ( - "https://custom-petstore.swagger.io:80/v2/custom", - { - "server_index": 0, - "server_variables": {"port": "80"}, # global override - }, - ), - ( - "https://custom-petstore.swagger.io:8080/v2/custom", - { - "server_index": 0, - "server_variables": {"port": "80"}, - "server_operation_variables": {"custom_server": {"port": "8080"}}, # operation override - }, - ), - ( - "https://third.example.com/global-prefix/custom", - { - "server_index": 2, - "server_variables": {"prefix": "global-prefix"}, # global override - }, - ), - ( - "https://third.example.com/local-prefix/custom", - { - "server_index": 1, - "server_variables": {"prefix": "global-prefix"}, - "server_operation_index": {"custom_server": 2}, - "server_operation_variables": {"custom_server": {"prefix": "local-prefix"}}, # operation override - }, - ), - ) - - def request(expected_url, method, url, **kwargs): - assert expected_url == url - raise RuntimeError("pass") - - for expected_url, kwargs in servers: - client = dynamic_servers.ApiClient(dynamic_servers.Configuration(**kwargs)) - client.request = functools.partial(request, expected_url) - api = UsageApi(client) - - try: - api.custom_server() - except RuntimeError as e: - assert "pass" == str(e) - - def test_default_server(self): - """Test case for default_server - - Use default server # noqa: E501 - """ - # expected value, config - servers = ( - ("http://petstore.swagger.io:80/v2/default", {}), - ( - "http://dev-petstore.swagger.io:8080/v2/default", - { - "server_index": 0, - "server_variables": {"server": "dev-petstore", "port": "8080"}, - }, - ), - ("https://localhost:8080/v1/default", {"server_index": 1}), - ( - "https://localhost:8080/v3/default", - {"server_index": 1, "server_variables": {"version": "v3"}}, - ), - ) - - def request(expected_url, method, url, **kwargs): - assert expected_url == url - raise RuntimeError("pass") - - for expected_url, kwargs in servers: - client = dynamic_servers.ApiClient(dynamic_servers.Configuration(**kwargs)) - client.request = functools.partial(request, expected_url) - api = UsageApi(client) - - try: - api.default_server() - except RuntimeError as e: - assert "pass" == str(e) - - -if __name__ == "__main__": - unittest.main() diff --git a/samples/openapi3/client/features/dynamic-servers/python/tox.ini b/samples/openapi3/client/features/dynamic-servers/python/tox.ini deleted file mode 100644 index 67c29e77f4e..00000000000 --- a/samples/openapi3/client/features/dynamic-servers/python/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py37 - -[testenv] -passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=dynamic_servers diff --git a/samples/openapi3/client/petstore/python/.gitignore b/samples/openapi3/client/petstore/python/.gitignore deleted file mode 100644 index a62e8aba43f..00000000000 --- a/samples/openapi3/client/petstore/python/.gitignore +++ /dev/null @@ -1,67 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -dev-requirements.txt.log - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/samples/openapi3/client/petstore/python/.gitlab-ci.yml b/samples/openapi3/client/petstore/python/.gitlab-ci.yml deleted file mode 100644 index 611e425676e..00000000000 --- a/samples/openapi3/client/petstore/python/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=petstore_api - -test-3.5: - extends: .tests - image: python:3.5-alpine -test-3.6: - extends: .tests - image: python:3.6-alpine -test-3.7: - extends: .tests - image: python:3.7-alpine -test-3.8: - extends: .tests - image: python:3.8-alpine diff --git a/samples/openapi3/client/petstore/python/.openapi-generator-ignore b/samples/openapi3/client/petstore/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/openapi3/client/petstore/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES deleted file mode 100644 index 2b3ab5ca462..00000000000 --- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES +++ /dev/null @@ -1,402 +0,0 @@ -.gitignore -.gitlab-ci.yml -.travis.yml -README.md -docs/apis/tags/AnotherFakeApi.md -docs/apis/tags/DefaultApi.md -docs/apis/tags/FakeApi.md -docs/apis/tags/FakeClassnameTags123Api.md -docs/apis/tags/PetApi.md -docs/apis/tags/StoreApi.md -docs/apis/tags/UserApi.md -docs/models/AdditionalPropertiesClass.md -docs/models/AdditionalPropertiesValidator.md -docs/models/AdditionalPropertiesWithArrayOfEnums.md -docs/models/Address.md -docs/models/Animal.md -docs/models/AnimalFarm.md -docs/models/AnyTypeAndFormat.md -docs/models/AnyTypeNotString.md -docs/models/ApiResponse.md -docs/models/Apple.md -docs/models/AppleReq.md -docs/models/ArrayHoldingAnyType.md -docs/models/ArrayOfArrayOfNumberOnly.md -docs/models/ArrayOfEnums.md -docs/models/ArrayOfNumberOnly.md -docs/models/ArrayTest.md -docs/models/ArrayWithValidationsInItems.md -docs/models/Banana.md -docs/models/BananaReq.md -docs/models/Bar.md -docs/models/BasquePig.md -docs/models/Boolean.md -docs/models/BooleanEnum.md -docs/models/Capitalization.md -docs/models/Cat.md -docs/models/Category.md -docs/models/ChildCat.md -docs/models/ClassModel.md -docs/models/Client.md -docs/models/ComplexQuadrilateral.md -docs/models/ComposedAnyOfDifferentTypesNoValidations.md -docs/models/ComposedArray.md -docs/models/ComposedBool.md -docs/models/ComposedNone.md -docs/models/ComposedNumber.md -docs/models/ComposedObject.md -docs/models/ComposedOneOfDifferentTypes.md -docs/models/ComposedString.md -docs/models/Currency.md -docs/models/DanishPig.md -docs/models/DateTimeTest.md -docs/models/DateTimeWithValidations.md -docs/models/DateWithValidations.md -docs/models/DecimalPayload.md -docs/models/Dog.md -docs/models/Drawing.md -docs/models/EnumArrays.md -docs/models/EnumClass.md -docs/models/EnumTest.md -docs/models/EquilateralTriangle.md -docs/models/File.md -docs/models/FileSchemaTestClass.md -docs/models/Foo.md -docs/models/FormatTest.md -docs/models/FromSchema.md -docs/models/Fruit.md -docs/models/FruitReq.md -docs/models/GmFruit.md -docs/models/GrandparentAnimal.md -docs/models/HasOnlyReadOnly.md -docs/models/HealthCheckResult.md -docs/models/IntegerEnum.md -docs/models/IntegerEnumBig.md -docs/models/IntegerEnumOneValue.md -docs/models/IntegerEnumWithDefaultValue.md -docs/models/IntegerMax10.md -docs/models/IntegerMin15.md -docs/models/IsoscelesTriangle.md -docs/models/JSONPatchRequest.md -docs/models/JSONPatchRequestAddReplaceTest.md -docs/models/JSONPatchRequestMoveCopy.md -docs/models/JSONPatchRequestRemove.md -docs/models/Mammal.md -docs/models/MapTest.md -docs/models/MixedPropertiesAndAdditionalPropertiesClass.md -docs/models/Model200Response.md -docs/models/ModelReturn.md -docs/models/Money.md -docs/models/Name.md -docs/models/NoAdditionalProperties.md -docs/models/NullableClass.md -docs/models/NullableShape.md -docs/models/NullableString.md -docs/models/Number.md -docs/models/NumberOnly.md -docs/models/NumberWithValidations.md -docs/models/ObjectInterface.md -docs/models/ObjectModelWithArgAndArgsProperties.md -docs/models/ObjectModelWithRefProps.md -docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md -docs/models/ObjectWithDecimalProperties.md -docs/models/ObjectWithDifficultlyNamedProps.md -docs/models/ObjectWithInlineCompositionProperty.md -docs/models/ObjectWithInvalidNamedRefedProperties.md -docs/models/ObjectWithOptionalTestProp.md -docs/models/ObjectWithValidations.md -docs/models/Order.md -docs/models/ParentPet.md -docs/models/Pet.md -docs/models/Pig.md -docs/models/Player.md -docs/models/Quadrilateral.md -docs/models/QuadrilateralInterface.md -docs/models/ReadOnlyFirst.md -docs/models/ScaleneTriangle.md -docs/models/Shape.md -docs/models/ShapeOrNull.md -docs/models/SimpleQuadrilateral.md -docs/models/SomeObject.md -docs/models/SpecialModelName.md -docs/models/String.md -docs/models/StringBooleanMap.md -docs/models/StringEnum.md -docs/models/StringEnumWithDefaultValue.md -docs/models/StringWithValidation.md -docs/models/Tag.md -docs/models/Triangle.md -docs/models/TriangleInterface.md -docs/models/UUIDString.md -docs/models/User.md -docs/models/Whale.md -docs/models/Zebra.md -git_push.sh -petstore_api/__init__.py -petstore_api/api_client.py -petstore_api/apis/__init__.py -petstore_api/apis/tags/another_fake_api.py -petstore_api/apis/tags/default_api.py -petstore_api/apis/tags/fake_api.py -petstore_api/apis/tags/fake_classname_tags123_api.py -petstore_api/apis/tags/pet_api.py -petstore_api/apis/tags/store_api.py -petstore_api/apis/tags/user_api.py -petstore_api/configuration.py -petstore_api/exceptions.py -petstore_api/model/__init__.py -petstore_api/model/additional_properties_class.py -petstore_api/model/additional_properties_class.pyi -petstore_api/model/additional_properties_validator.py -petstore_api/model/additional_properties_validator.pyi -petstore_api/model/additional_properties_with_array_of_enums.py -petstore_api/model/additional_properties_with_array_of_enums.pyi -petstore_api/model/address.py -petstore_api/model/address.pyi -petstore_api/model/animal.py -petstore_api/model/animal.pyi -petstore_api/model/animal_farm.py -petstore_api/model/animal_farm.pyi -petstore_api/model/any_type_and_format.py -petstore_api/model/any_type_and_format.pyi -petstore_api/model/any_type_not_string.py -petstore_api/model/any_type_not_string.pyi -petstore_api/model/api_response.py -petstore_api/model/api_response.pyi -petstore_api/model/apple.py -petstore_api/model/apple.pyi -petstore_api/model/apple_req.py -petstore_api/model/apple_req.pyi -petstore_api/model/array_holding_any_type.py -petstore_api/model/array_holding_any_type.pyi -petstore_api/model/array_of_array_of_number_only.py -petstore_api/model/array_of_array_of_number_only.pyi -petstore_api/model/array_of_enums.py -petstore_api/model/array_of_enums.pyi -petstore_api/model/array_of_number_only.py -petstore_api/model/array_of_number_only.pyi -petstore_api/model/array_test.py -petstore_api/model/array_test.pyi -petstore_api/model/array_with_validations_in_items.py -petstore_api/model/array_with_validations_in_items.pyi -petstore_api/model/banana.py -petstore_api/model/banana.pyi -petstore_api/model/banana_req.py -petstore_api/model/banana_req.pyi -petstore_api/model/bar.py -petstore_api/model/bar.pyi -petstore_api/model/basque_pig.py -petstore_api/model/basque_pig.pyi -petstore_api/model/boolean.py -petstore_api/model/boolean.pyi -petstore_api/model/boolean_enum.py -petstore_api/model/boolean_enum.pyi -petstore_api/model/capitalization.py -petstore_api/model/capitalization.pyi -petstore_api/model/cat.py -petstore_api/model/cat.pyi -petstore_api/model/category.py -petstore_api/model/category.pyi -petstore_api/model/child_cat.py -petstore_api/model/child_cat.pyi -petstore_api/model/class_model.py -petstore_api/model/class_model.pyi -petstore_api/model/client.py -petstore_api/model/client.pyi -petstore_api/model/complex_quadrilateral.py -petstore_api/model/complex_quadrilateral.pyi -petstore_api/model/composed_any_of_different_types_no_validations.py -petstore_api/model/composed_any_of_different_types_no_validations.pyi -petstore_api/model/composed_array.py -petstore_api/model/composed_array.pyi -petstore_api/model/composed_bool.py -petstore_api/model/composed_bool.pyi -petstore_api/model/composed_none.py -petstore_api/model/composed_none.pyi -petstore_api/model/composed_number.py -petstore_api/model/composed_number.pyi -petstore_api/model/composed_object.py -petstore_api/model/composed_object.pyi -petstore_api/model/composed_one_of_different_types.py -petstore_api/model/composed_one_of_different_types.pyi -petstore_api/model/composed_string.py -petstore_api/model/composed_string.pyi -petstore_api/model/currency.py -petstore_api/model/currency.pyi -petstore_api/model/danish_pig.py -petstore_api/model/danish_pig.pyi -petstore_api/model/date_time_test.py -petstore_api/model/date_time_test.pyi -petstore_api/model/date_time_with_validations.py -petstore_api/model/date_time_with_validations.pyi -petstore_api/model/date_with_validations.py -petstore_api/model/date_with_validations.pyi -petstore_api/model/decimal_payload.py -petstore_api/model/decimal_payload.pyi -petstore_api/model/dog.py -petstore_api/model/dog.pyi -petstore_api/model/drawing.py -petstore_api/model/drawing.pyi -petstore_api/model/enum_arrays.py -petstore_api/model/enum_arrays.pyi -petstore_api/model/enum_class.py -petstore_api/model/enum_class.pyi -petstore_api/model/enum_test.py -petstore_api/model/enum_test.pyi -petstore_api/model/equilateral_triangle.py -petstore_api/model/equilateral_triangle.pyi -petstore_api/model/file.py -petstore_api/model/file.pyi -petstore_api/model/file_schema_test_class.py -petstore_api/model/file_schema_test_class.pyi -petstore_api/model/foo.py -petstore_api/model/foo.pyi -petstore_api/model/format_test.py -petstore_api/model/format_test.pyi -petstore_api/model/from_schema.py -petstore_api/model/from_schema.pyi -petstore_api/model/fruit.py -petstore_api/model/fruit.pyi -petstore_api/model/fruit_req.py -petstore_api/model/fruit_req.pyi -petstore_api/model/gm_fruit.py -petstore_api/model/gm_fruit.pyi -petstore_api/model/grandparent_animal.py -petstore_api/model/grandparent_animal.pyi -petstore_api/model/has_only_read_only.py -petstore_api/model/has_only_read_only.pyi -petstore_api/model/health_check_result.py -petstore_api/model/health_check_result.pyi -petstore_api/model/integer_enum.py -petstore_api/model/integer_enum.pyi -petstore_api/model/integer_enum_big.py -petstore_api/model/integer_enum_big.pyi -petstore_api/model/integer_enum_one_value.py -petstore_api/model/integer_enum_one_value.pyi -petstore_api/model/integer_enum_with_default_value.py -petstore_api/model/integer_enum_with_default_value.pyi -petstore_api/model/integer_max10.py -petstore_api/model/integer_max10.pyi -petstore_api/model/integer_min15.py -petstore_api/model/integer_min15.pyi -petstore_api/model/isosceles_triangle.py -petstore_api/model/isosceles_triangle.pyi -petstore_api/model/json_patch_request.py -petstore_api/model/json_patch_request.pyi -petstore_api/model/json_patch_request_add_replace_test.py -petstore_api/model/json_patch_request_add_replace_test.pyi -petstore_api/model/json_patch_request_move_copy.py -petstore_api/model/json_patch_request_move_copy.pyi -petstore_api/model/json_patch_request_remove.py -petstore_api/model/json_patch_request_remove.pyi -petstore_api/model/mammal.py -petstore_api/model/mammal.pyi -petstore_api/model/map_test.py -petstore_api/model/map_test.pyi -petstore_api/model/mixed_properties_and_additional_properties_class.py -petstore_api/model/mixed_properties_and_additional_properties_class.pyi -petstore_api/model/model200_response.py -petstore_api/model/model200_response.pyi -petstore_api/model/model_return.py -petstore_api/model/model_return.pyi -petstore_api/model/money.py -petstore_api/model/money.pyi -petstore_api/model/name.py -petstore_api/model/name.pyi -petstore_api/model/no_additional_properties.py -petstore_api/model/no_additional_properties.pyi -petstore_api/model/nullable_class.py -petstore_api/model/nullable_class.pyi -petstore_api/model/nullable_shape.py -petstore_api/model/nullable_shape.pyi -petstore_api/model/nullable_string.py -petstore_api/model/nullable_string.pyi -petstore_api/model/number.py -petstore_api/model/number.pyi -petstore_api/model/number_only.py -petstore_api/model/number_only.pyi -petstore_api/model/number_with_validations.py -petstore_api/model/number_with_validations.pyi -petstore_api/model/object_interface.py -petstore_api/model/object_interface.pyi -petstore_api/model/object_model_with_arg_and_args_properties.py -petstore_api/model/object_model_with_arg_and_args_properties.pyi -petstore_api/model/object_model_with_ref_props.py -petstore_api/model/object_model_with_ref_props.pyi -petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py -petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi -petstore_api/model/object_with_decimal_properties.py -petstore_api/model/object_with_decimal_properties.pyi -petstore_api/model/object_with_difficultly_named_props.py -petstore_api/model/object_with_difficultly_named_props.pyi -petstore_api/model/object_with_inline_composition_property.py -petstore_api/model/object_with_inline_composition_property.pyi -petstore_api/model/object_with_invalid_named_refed_properties.py -petstore_api/model/object_with_invalid_named_refed_properties.pyi -petstore_api/model/object_with_optional_test_prop.py -petstore_api/model/object_with_optional_test_prop.pyi -petstore_api/model/object_with_validations.py -petstore_api/model/object_with_validations.pyi -petstore_api/model/order.py -petstore_api/model/order.pyi -petstore_api/model/parent_pet.py -petstore_api/model/parent_pet.pyi -petstore_api/model/pet.py -petstore_api/model/pet.pyi -petstore_api/model/pig.py -petstore_api/model/pig.pyi -petstore_api/model/player.py -petstore_api/model/player.pyi -petstore_api/model/quadrilateral.py -petstore_api/model/quadrilateral.pyi -petstore_api/model/quadrilateral_interface.py -petstore_api/model/quadrilateral_interface.pyi -petstore_api/model/read_only_first.py -petstore_api/model/read_only_first.pyi -petstore_api/model/scalene_triangle.py -petstore_api/model/scalene_triangle.pyi -petstore_api/model/shape.py -petstore_api/model/shape.pyi -petstore_api/model/shape_or_null.py -petstore_api/model/shape_or_null.pyi -petstore_api/model/simple_quadrilateral.py -petstore_api/model/simple_quadrilateral.pyi -petstore_api/model/some_object.py -petstore_api/model/some_object.pyi -petstore_api/model/special_model_name.py -petstore_api/model/special_model_name.pyi -petstore_api/model/string.py -petstore_api/model/string.pyi -petstore_api/model/string_boolean_map.py -petstore_api/model/string_boolean_map.pyi -petstore_api/model/string_enum.py -petstore_api/model/string_enum.pyi -petstore_api/model/string_enum_with_default_value.py -petstore_api/model/string_enum_with_default_value.pyi -petstore_api/model/string_with_validation.py -petstore_api/model/string_with_validation.pyi -petstore_api/model/tag.py -petstore_api/model/tag.pyi -petstore_api/model/triangle.py -petstore_api/model/triangle.pyi -petstore_api/model/triangle_interface.py -petstore_api/model/triangle_interface.pyi -petstore_api/model/user.py -petstore_api/model/user.pyi -petstore_api/model/uuid_string.py -petstore_api/model/uuid_string.pyi -petstore_api/model/whale.py -petstore_api/model/whale.pyi -petstore_api/model/zebra.py -petstore_api/model/zebra.pyi -petstore_api/models/__init__.py -petstore_api/rest.py -petstore_api/schemas.py -petstore_api/signing.py -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_models/__init__.py -tox.ini diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION deleted file mode 100644 index 757e6740040..00000000000 --- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/.travis.yml b/samples/openapi3/client/petstore/python/.travis.yml deleted file mode 100644 index f931f0f74b9..00000000000 --- a/samples/openapi3/client/petstore/python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=petstore_api diff --git a/samples/openapi3/client/petstore/python/Makefile b/samples/openapi3/client/petstore/python/Makefile deleted file mode 100644 index 863c380ebef..00000000000 --- a/samples/openapi3/client/petstore/python/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log -SETUP_OUT=*.egg-info -VENV=venv - -clean: - rm -rf $(REQUIREMENTS_OUT) - rm -rf $(SETUP_OUT) - rm -rf $(VENV) - rm -rf .tox - rm -rf .coverage - find . -name "*.py[oc]" -delete - find . -name "__pycache__" -delete - -test: clean - bash ./test_python.sh \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md deleted file mode 100644 index 6582aa207a0..00000000000 --- a/samples/openapi3/client/petstore/python/README.md +++ /dev/null @@ -1,427 +0,0 @@ -# petstore-api -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- Package version: 1.0.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -Python >=3.7 - -## Migration from other generators like python and python-legacy - -### Changes -1. This generator uses spec case for all (object) property names and parameter names. - - So if the spec has a property name like camelCase, it will use camelCase rather than camel_case - - So you will need to update how you input and read properties to use spec case -2. Endpoint parameters are stored in dictionaries to prevent collisions (explanation below) - - So you will need to update how you pass data in to endpoints -3. Endpoint responses now include the original response, the deserialized response body, and (todo)the deserialized headers - - So you will need to update your code to use response.body to access deserialized data -4. All validated data is instantiated in an instance that subclasses all validated Schema classes and Decimal/str/list/tuple/frozendict/NoneClass/BoolClass/bytes/io.FileIO - - This means that you can use isinstance to check if a payload validated against a schema class - - This means that no data will be of type None/True/False - - ingested None will subclass NoneClass - - ingested True will subclass BoolClass - - ingested False will subclass BoolClass - - So if you need to check is True/False/None, instead use instance.is_true_oapg()/.is_false_oapg()/.is_none_oapg() -5. All validated class instances are immutable except for ones based on io.File - - This is because if properties were changed after validation, that validation would no longer apply - - So no changing values or property values after a class has been instantiated -6. String + Number types with formats - - String type data is stored as a string and if you need to access types based on its format like date, - date-time, uuid, number etc then you will need to use accessor functions on the instance - - type string + format: See .as_date_oapg, .as_datetime_oapg, .as_decimal_oapg, .as_uuid_oapg - - type number + format: See .as_float_oapg, .as_int_oapg - - this was done because openapi/json-schema defines constraints. string data may be type string with no format - keyword in one schema, and include a format constraint in another schema - - So if you need to access a string format based type, use as_date_oapg/as_datetime_oapg/as_decimal_oapg/as_uuid_oapg - - So if you need to access a number format based type, use as_int_oapg/as_float_oapg -7. Property access on AnyType(type unset) or object(dict) schemas - - Only required keys with valid python names are properties like .someProp and have type hints - - All optional keys may not exist, so properties are not defined for them - - One can access optional values with dict_instance['optionalProp'] and KeyError will be raised if it does not exist - - Use get_item_oapg if you need a way to always get a value whether or not the key exists - - If the key does not exist, schemas.unset is returned from calling dict_instance.get_item_oapg('optionalProp') - - All required and optional keys have type hints for this method, and @typing.overload is used - - A type hint is also generated for additionalProperties accessed using this method - - So you will need to update you code to use some_instance['optionalProp'] to access optional property - and additionalProperty values -8. The location of the api classes has changed - - Api classes are located in your_package.apis.tags.some_api - - This change was made to eliminate redundant code generation - - Legacy generators generated the same endpoint twice if it had > 1 tag on it - - This generator defines an endpoint in one class, then inherits that class to generate - apis by tags and by paths - - This change reduces code and allows quicker run time if you use the path apis - - path apis are at your_package.apis.paths.some_path - - Those apis will only load their needed models, which is less to load than all of the resources needed in a tag api - - So you will need to update your import paths to the api classes - -### Why are Oapg and _oapg used in class and method names? -Classes can have arbitrarily named properties set on them -Endpoints can have arbitrary operationId method names set -For those reasons, I use the prefix Oapg and _oapg to greatly reduce the likelihood of collisions -on protected + public classes/methods. -oapg stands for OpenApi Python Generator. - -### Object property spec case -This was done because when payloads are ingested, they can be validated against N number of schemas. -If the input signature used a different property name then that has mutated the payload. -So SchemaA and SchemaB must both see the camelCase spec named variable. -Also it is possible to send in two properties, named camelCase and camel_case in the same payload. -That use case should be support so spec case is used. - -### Parameter spec case -Parameters can be included in different locations including: -- query -- path -- header -- cookie - -Any of those parameters could use the same parameter names, so if every parameter -was included as an endpoint parameter in a function signature, they would collide. -For that reason, each of those inputs have been separated out into separate typed dictionaries: -- query_params -- path_params -- header_params -- cookie_params - -So when updating your code, you will need to pass endpoint parameters in using those -dictionaries. - -### Endpoint responses -Endpoint responses have been enriched to now include more information. -Any response reom an endpoint will now include the following properties: -response: urllib3.HTTPResponse -body: typing.Union[Unset, Schema] -headers: typing.Union[Unset, TODO] -Note: response header deserialization has not yet been added - - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import petstore_api -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import petstore_api -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python -import datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetimeimport datetime -import time -import petstore_api -from pprint import pprint -from petstore_api.apis.tags import another_fake_api -from petstore_api.model.client import Client -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = another_fake_api.AnotherFakeApi(api_client) - client = Client( - client="client_example", - ) # Client | client model - - try: - # To test special tags - api_response = api_instance.call_123_test_special_tags(client) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**call_123_test_special_tags**](docs/apis/tags/AnotherFakeApi.md#call_123_test_special_tags) | **patch** /another-fake/dummy | To test special tags -*DefaultApi* | [**foo_get**](docs/apis/tags/DefaultApi.md#foo_get) | **get** /foo | -*FakeApi* | [**additional_properties_with_array_of_enums**](docs/apis/tags/FakeApi.md#additional_properties_with_array_of_enums) | **get** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums -*FakeApi* | [**array_model**](docs/apis/tags/FakeApi.md#array_model) | **post** /fake/refs/arraymodel | -*FakeApi* | [**array_of_enums**](docs/apis/tags/FakeApi.md#array_of_enums) | **post** /fake/refs/array-of-enums | Array of Enums -*FakeApi* | [**body_with_file_schema**](docs/apis/tags/FakeApi.md#body_with_file_schema) | **put** /fake/body-with-file-schema | -*FakeApi* | [**body_with_query_params**](docs/apis/tags/FakeApi.md#body_with_query_params) | **put** /fake/body-with-query-params | -*FakeApi* | [**boolean**](docs/apis/tags/FakeApi.md#boolean) | **post** /fake/refs/boolean | -*FakeApi* | [**case_sensitive_params**](docs/apis/tags/FakeApi.md#case_sensitive_params) | **put** /fake/case-sensitive-params | -*FakeApi* | [**client_model**](docs/apis/tags/FakeApi.md#client_model) | **patch** /fake | To test \"client\" model -*FakeApi* | [**composed_one_of_different_types**](docs/apis/tags/FakeApi.md#composed_one_of_different_types) | **post** /fake/refs/composed_one_of_number_with_validations | -*FakeApi* | [**delete_coffee**](docs/apis/tags/FakeApi.md#delete_coffee) | **delete** /fake/deleteCoffee/{id} | Delete coffee -*FakeApi* | [**endpoint_parameters**](docs/apis/tags/FakeApi.md#endpoint_parameters) | **post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**enum_parameters**](docs/apis/tags/FakeApi.md#enum_parameters) | **get** /fake | To test enum parameters -*FakeApi* | [**fake_health_get**](docs/apis/tags/FakeApi.md#fake_health_get) | **get** /fake/health | Health check endpoint -*FakeApi* | [**group_parameters**](docs/apis/tags/FakeApi.md#group_parameters) | **delete** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**inline_additional_properties**](docs/apis/tags/FakeApi.md#inline_additional_properties) | **post** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**inline_composition**](docs/apis/tags/FakeApi.md#inline_composition) | **post** /fake/inlineComposition/ | testing composed schemas at inline locations -*FakeApi* | [**json_form_data**](docs/apis/tags/FakeApi.md#json_form_data) | **get** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**json_patch**](docs/apis/tags/FakeApi.md#json_patch) | **patch** /fake/jsonPatch | json patch -*FakeApi* | [**json_with_charset**](docs/apis/tags/FakeApi.md#json_with_charset) | **post** /fake/jsonWithCharset | json with charset tx and rx -*FakeApi* | [**mammal**](docs/apis/tags/FakeApi.md#mammal) | **post** /fake/refs/mammal | -*FakeApi* | [**number_with_validations**](docs/apis/tags/FakeApi.md#number_with_validations) | **post** /fake/refs/number | -*FakeApi* | [**object_in_query**](docs/apis/tags/FakeApi.md#object_in_query) | **get** /fake/objInQuery | user list -*FakeApi* | [**object_model_with_ref_props**](docs/apis/tags/FakeApi.md#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | -*FakeApi* | [**parameter_collisions**](docs/apis/tags/FakeApi.md#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case -*FakeApi* | [**query_param_with_json_content_type**](docs/apis/tags/FakeApi.md#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type -*FakeApi* | [**query_parameter_collection_format**](docs/apis/tags/FakeApi.md#query_parameter_collection_format) | **put** /fake/test-query-parameters | -*FakeApi* | [**ref_object_in_query**](docs/apis/tags/FakeApi.md#ref_object_in_query) | **get** /fake/refObjInQuery | user list -*FakeApi* | [**response_without_schema**](docs/apis/tags/FakeApi.md#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema -*FakeApi* | [**string**](docs/apis/tags/FakeApi.md#string) | **post** /fake/refs/string | -*FakeApi* | [**string_enum**](docs/apis/tags/FakeApi.md#string_enum) | **post** /fake/refs/enum | -*FakeApi* | [**upload_download_file**](docs/apis/tags/FakeApi.md#upload_download_file) | **post** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream -*FakeApi* | [**upload_file**](docs/apis/tags/FakeApi.md#upload_file) | **post** /fake/uploadFile | uploads a file using multipart/form-data -*FakeApi* | [**upload_files**](docs/apis/tags/FakeApi.md#upload_files) | **post** /fake/uploadFiles | uploads files using multipart/form-data -*FakeClassnameTags123Api* | [**classname**](docs/apis/tags/FakeClassnameTags123Api.md#classname) | **patch** /fake_classname_test | To test class name in snake case -*PetApi* | [**add_pet**](docs/apis/tags/PetApi.md#add_pet) | **post** /pet | Add a new pet to the store -*PetApi* | [**delete_pet**](docs/apis/tags/PetApi.md#delete_pet) | **delete** /pet/{petId} | Deletes a pet -*PetApi* | [**find_pets_by_status**](docs/apis/tags/PetApi.md#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status -*PetApi* | [**find_pets_by_tags**](docs/apis/tags/PetApi.md#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags -*PetApi* | [**get_pet_by_id**](docs/apis/tags/PetApi.md#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID -*PetApi* | [**update_pet**](docs/apis/tags/PetApi.md#update_pet) | **put** /pet | Update an existing pet -*PetApi* | [**update_pet_with_form**](docs/apis/tags/PetApi.md#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**upload_file_with_required_file**](docs/apis/tags/PetApi.md#upload_file_with_required_file) | **post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*PetApi* | [**upload_image**](docs/apis/tags/PetApi.md#upload_image) | **post** /pet/{petId}/uploadImage | uploads an image -*StoreApi* | [**delete_order**](docs/apis/tags/StoreApi.md#delete_order) | **delete** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**get_inventory**](docs/apis/tags/StoreApi.md#get_inventory) | **get** /store/inventory | Returns pet inventories by status -*StoreApi* | [**get_order_by_id**](docs/apis/tags/StoreApi.md#get_order_by_id) | **get** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**place_order**](docs/apis/tags/StoreApi.md#place_order) | **post** /store/order | Place an order for a pet -*UserApi* | [**create_user**](docs/apis/tags/UserApi.md#create_user) | **post** /user | Create user -*UserApi* | [**create_users_with_array_input**](docs/apis/tags/UserApi.md#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**create_users_with_list_input**](docs/apis/tags/UserApi.md#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array -*UserApi* | [**delete_user**](docs/apis/tags/UserApi.md#delete_user) | **delete** /user/{username} | Delete user -*UserApi* | [**get_user_by_name**](docs/apis/tags/UserApi.md#get_user_by_name) | **get** /user/{username} | Get user by user name -*UserApi* | [**login_user**](docs/apis/tags/UserApi.md#login_user) | **get** /user/login | Logs user into the system -*UserApi* | [**logout_user**](docs/apis/tags/UserApi.md#logout_user) | **get** /user/logout | Logs out current logged in user session -*UserApi* | [**update_user**](docs/apis/tags/UserApi.md#update_user) | **put** /user/{username} | Updated user - -## Documentation For Models - - - [AdditionalPropertiesClass](docs/models/AdditionalPropertiesClass.md) - - [AdditionalPropertiesValidator](docs/models/AdditionalPropertiesValidator.md) - - [AdditionalPropertiesWithArrayOfEnums](docs/models/AdditionalPropertiesWithArrayOfEnums.md) - - [Address](docs/models/Address.md) - - [Animal](docs/models/Animal.md) - - [AnimalFarm](docs/models/AnimalFarm.md) - - [AnyTypeAndFormat](docs/models/AnyTypeAndFormat.md) - - [AnyTypeNotString](docs/models/AnyTypeNotString.md) - - [ApiResponse](docs/models/ApiResponse.md) - - [Apple](docs/models/Apple.md) - - [AppleReq](docs/models/AppleReq.md) - - [ArrayHoldingAnyType](docs/models/ArrayHoldingAnyType.md) - - [ArrayOfArrayOfNumberOnly](docs/models/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfEnums](docs/models/ArrayOfEnums.md) - - [ArrayOfNumberOnly](docs/models/ArrayOfNumberOnly.md) - - [ArrayTest](docs/models/ArrayTest.md) - - [ArrayWithValidationsInItems](docs/models/ArrayWithValidationsInItems.md) - - [Banana](docs/models/Banana.md) - - [BananaReq](docs/models/BananaReq.md) - - [Bar](docs/models/Bar.md) - - [BasquePig](docs/models/BasquePig.md) - - [Boolean](docs/models/Boolean.md) - - [BooleanEnum](docs/models/BooleanEnum.md) - - [Capitalization](docs/models/Capitalization.md) - - [Cat](docs/models/Cat.md) - - [Category](docs/models/Category.md) - - [ChildCat](docs/models/ChildCat.md) - - [ClassModel](docs/models/ClassModel.md) - - [Client](docs/models/Client.md) - - [ComplexQuadrilateral](docs/models/ComplexQuadrilateral.md) - - [ComposedAnyOfDifferentTypesNoValidations](docs/models/ComposedAnyOfDifferentTypesNoValidations.md) - - [ComposedArray](docs/models/ComposedArray.md) - - [ComposedBool](docs/models/ComposedBool.md) - - [ComposedNone](docs/models/ComposedNone.md) - - [ComposedNumber](docs/models/ComposedNumber.md) - - [ComposedObject](docs/models/ComposedObject.md) - - [ComposedOneOfDifferentTypes](docs/models/ComposedOneOfDifferentTypes.md) - - [ComposedString](docs/models/ComposedString.md) - - [Currency](docs/models/Currency.md) - - [DanishPig](docs/models/DanishPig.md) - - [DateTimeTest](docs/models/DateTimeTest.md) - - [DateTimeWithValidations](docs/models/DateTimeWithValidations.md) - - [DateWithValidations](docs/models/DateWithValidations.md) - - [DecimalPayload](docs/models/DecimalPayload.md) - - [Dog](docs/models/Dog.md) - - [Drawing](docs/models/Drawing.md) - - [EnumArrays](docs/models/EnumArrays.md) - - [EnumClass](docs/models/EnumClass.md) - - [EnumTest](docs/models/EnumTest.md) - - [EquilateralTriangle](docs/models/EquilateralTriangle.md) - - [File](docs/models/File.md) - - [FileSchemaTestClass](docs/models/FileSchemaTestClass.md) - - [Foo](docs/models/Foo.md) - - [FormatTest](docs/models/FormatTest.md) - - [FromSchema](docs/models/FromSchema.md) - - [Fruit](docs/models/Fruit.md) - - [FruitReq](docs/models/FruitReq.md) - - [GmFruit](docs/models/GmFruit.md) - - [GrandparentAnimal](docs/models/GrandparentAnimal.md) - - [HasOnlyReadOnly](docs/models/HasOnlyReadOnly.md) - - [HealthCheckResult](docs/models/HealthCheckResult.md) - - [IntegerEnum](docs/models/IntegerEnum.md) - - [IntegerEnumBig](docs/models/IntegerEnumBig.md) - - [IntegerEnumOneValue](docs/models/IntegerEnumOneValue.md) - - [IntegerEnumWithDefaultValue](docs/models/IntegerEnumWithDefaultValue.md) - - [IntegerMax10](docs/models/IntegerMax10.md) - - [IntegerMin15](docs/models/IntegerMin15.md) - - [IsoscelesTriangle](docs/models/IsoscelesTriangle.md) - - [JSONPatchRequest](docs/models/JSONPatchRequest.md) - - [JSONPatchRequestAddReplaceTest](docs/models/JSONPatchRequestAddReplaceTest.md) - - [JSONPatchRequestMoveCopy](docs/models/JSONPatchRequestMoveCopy.md) - - [JSONPatchRequestRemove](docs/models/JSONPatchRequestRemove.md) - - [Mammal](docs/models/Mammal.md) - - [MapTest](docs/models/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/models/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/models/Model200Response.md) - - [ModelReturn](docs/models/ModelReturn.md) - - [Money](docs/models/Money.md) - - [Name](docs/models/Name.md) - - [NoAdditionalProperties](docs/models/NoAdditionalProperties.md) - - [NullableClass](docs/models/NullableClass.md) - - [NullableShape](docs/models/NullableShape.md) - - [NullableString](docs/models/NullableString.md) - - [Number](docs/models/Number.md) - - [NumberOnly](docs/models/NumberOnly.md) - - [NumberWithValidations](docs/models/NumberWithValidations.md) - - [ObjectInterface](docs/models/ObjectInterface.md) - - [ObjectModelWithArgAndArgsProperties](docs/models/ObjectModelWithArgAndArgsProperties.md) - - [ObjectModelWithRefProps](docs/models/ObjectModelWithRefProps.md) - - [ObjectWithAllOfWithReqTestPropFromUnsetAddProp](docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md) - - [ObjectWithDecimalProperties](docs/models/ObjectWithDecimalProperties.md) - - [ObjectWithDifficultlyNamedProps](docs/models/ObjectWithDifficultlyNamedProps.md) - - [ObjectWithInlineCompositionProperty](docs/models/ObjectWithInlineCompositionProperty.md) - - [ObjectWithInvalidNamedRefedProperties](docs/models/ObjectWithInvalidNamedRefedProperties.md) - - [ObjectWithOptionalTestProp](docs/models/ObjectWithOptionalTestProp.md) - - [ObjectWithValidations](docs/models/ObjectWithValidations.md) - - [Order](docs/models/Order.md) - - [ParentPet](docs/models/ParentPet.md) - - [Pet](docs/models/Pet.md) - - [Pig](docs/models/Pig.md) - - [Player](docs/models/Player.md) - - [Quadrilateral](docs/models/Quadrilateral.md) - - [QuadrilateralInterface](docs/models/QuadrilateralInterface.md) - - [ReadOnlyFirst](docs/models/ReadOnlyFirst.md) - - [ScaleneTriangle](docs/models/ScaleneTriangle.md) - - [Shape](docs/models/Shape.md) - - [ShapeOrNull](docs/models/ShapeOrNull.md) - - [SimpleQuadrilateral](docs/models/SimpleQuadrilateral.md) - - [SomeObject](docs/models/SomeObject.md) - - [SpecialModelName](docs/models/SpecialModelName.md) - - [String](docs/models/String.md) - - [StringBooleanMap](docs/models/StringBooleanMap.md) - - [StringEnum](docs/models/StringEnum.md) - - [StringEnumWithDefaultValue](docs/models/StringEnumWithDefaultValue.md) - - [StringWithValidation](docs/models/StringWithValidation.md) - - [Tag](docs/models/Tag.md) - - [Triangle](docs/models/Triangle.md) - - [TriangleInterface](docs/models/TriangleInterface.md) - - [UUIDString](docs/models/UUIDString.md) - - [User](docs/models/User.md) - - [Whale](docs/models/Whale.md) - - [Zebra](docs/models/Zebra.md) - -## Documentation For Authorization - -Authentication schemes defined for the API: - -### petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - **write:pets**: modify pets in your account - - **read:pets**: read your pets - - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - -- **Type**: HTTP basic authentication - - -### bearer_test - -- **Type**: Bearer authentication (JWT) - - -### http_signature_test - -- **Type**: HTTP signature authentication - - -## Author - - - - - - - - - -## Notes for Large OpenAPI documents -If the OpenAPI document is large, imports in petstore_api.apis and petstore_api.models may fail with a -RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions: - -Solution 1: -Use specific imports for apis and models like: -- `from petstore_api.apis.default_api import DefaultApi` -- `from petstore_api.model.pet import Pet` - -Solution 1: -Before importing the package, adjust the maximum recursion limit as shown below: -``` -import sys -sys.setrecursionlimit(1500) -import petstore_api -from petstore_api.apis import * -from petstore_api.models import * -``` diff --git a/samples/openapi3/client/petstore/python/dev-requirements.txt b/samples/openapi3/client/petstore/python/dev-requirements.txt deleted file mode 100644 index ccdfca62949..00000000000 --- a/samples/openapi3/client/petstore/python/dev-requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -tox -flake8 diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md deleted file mode 100644 index e466164d8bd..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/AnotherFakeApi.md +++ /dev/null @@ -1,93 +0,0 @@ - -# petstore_api.apis.tags.another_fake_api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**call_123_test_special_tags**](#call_123_test_special_tags) | **patch** /another-fake/dummy | To test special tags - -# **call_123_test_special_tags** - -> Client call_123_test_special_tags(client) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import another_fake_api -from petstore_api.model.client import Client -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = another_fake_api.AnotherFakeApi(api_client) - - # example passing only required values which don't have defaults set - body = Client( - client="client_example", - ) - try: - # To test special tags - api_response = api_instance.call_123_test_special_tags( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#call_123_test_special_tags.ApiResponseFor200) | successful operation - -#### call_123_test_special_tags.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md deleted file mode 100644 index 732b50c6fb1..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/DefaultApi.md +++ /dev/null @@ -1,76 +0,0 @@ - -# petstore_api.apis.tags.default_api.DefaultApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**foo_get**](#foo_get) | **get** /foo | - -# **foo_get** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} foo_get() - - - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import default_api -from petstore_api.model.foo import Foo -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = default_api.DefaultApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - api_response = api_instance.foo_get() - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling DefaultApi->foo_get: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#foo_get.ApiResponseForDefault) | response - -#### foo_get.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor0ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor0ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**string** | [**Foo**]({{complexTypePrefix}}Foo.md) | [**Foo**]({{complexTypePrefix}}Foo.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md deleted file mode 100644 index 5b0f85b01ca..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeApi.md +++ /dev/null @@ -1,3522 +0,0 @@ - -# petstore_api.apis.tags.fake_api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**additional_properties_with_array_of_enums**](#additional_properties_with_array_of_enums) | **get** /fake/additional-properties-with-array-of-enums | Additional Properties with Array of Enums -[**array_model**](#array_model) | **post** /fake/refs/arraymodel | -[**array_of_enums**](#array_of_enums) | **post** /fake/refs/array-of-enums | Array of Enums -[**body_with_file_schema**](#body_with_file_schema) | **put** /fake/body-with-file-schema | -[**body_with_query_params**](#body_with_query_params) | **put** /fake/body-with-query-params | -[**boolean**](#boolean) | **post** /fake/refs/boolean | -[**case_sensitive_params**](#case_sensitive_params) | **put** /fake/case-sensitive-params | -[**client_model**](#client_model) | **patch** /fake | To test \"client\" model -[**composed_one_of_different_types**](#composed_one_of_different_types) | **post** /fake/refs/composed_one_of_number_with_validations | -[**delete_coffee**](#delete_coffee) | **delete** /fake/deleteCoffee/{id} | Delete coffee -[**endpoint_parameters**](#endpoint_parameters) | **post** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**enum_parameters**](#enum_parameters) | **get** /fake | To test enum parameters -[**fake_health_get**](#fake_health_get) | **get** /fake/health | Health check endpoint -[**group_parameters**](#group_parameters) | **delete** /fake | Fake endpoint to test group parameters (optional) -[**inline_additional_properties**](#inline_additional_properties) | **post** /fake/inline-additionalProperties | test inline additionalProperties -[**inline_composition**](#inline_composition) | **post** /fake/inlineComposition/ | testing composed schemas at inline locations -[**json_form_data**](#json_form_data) | **get** /fake/jsonFormData | test json serialization of form data -[**json_patch**](#json_patch) | **patch** /fake/jsonPatch | json patch -[**json_with_charset**](#json_with_charset) | **post** /fake/jsonWithCharset | json with charset tx and rx -[**mammal**](#mammal) | **post** /fake/refs/mammal | -[**number_with_validations**](#number_with_validations) | **post** /fake/refs/number | -[**object_in_query**](#object_in_query) | **get** /fake/objInQuery | user list -[**object_model_with_ref_props**](#object_model_with_ref_props) | **post** /fake/refs/object_model_with_ref_props | -[**parameter_collisions**](#parameter_collisions) | **post** /fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/ | parameter collision case -[**query_param_with_json_content_type**](#query_param_with_json_content_type) | **get** /fake/queryParamWithJsonContentType | query param with json content-type -[**query_parameter_collection_format**](#query_parameter_collection_format) | **put** /fake/test-query-parameters | -[**ref_object_in_query**](#ref_object_in_query) | **get** /fake/refObjInQuery | user list -[**response_without_schema**](#response_without_schema) | **get** /fake/responseWithoutSchema | receives a response without schema -[**string**](#string) | **post** /fake/refs/string | -[**string_enum**](#string_enum) | **post** /fake/refs/enum | -[**upload_download_file**](#upload_download_file) | **post** /fake/uploadDownloadFile | uploads a file and downloads a file using application/octet-stream -[**upload_file**](#upload_file) | **post** /fake/uploadFile | uploads a file using multipart/form-data -[**upload_files**](#upload_files) | **post** /fake/uploadFiles | uploads files using multipart/form-data - -# **additional_properties_with_array_of_enums** - -> AdditionalPropertiesWithArrayOfEnums additional_properties_with_array_of_enums() - -Additional Properties with Array of Enums - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = AdditionalPropertiesWithArrayOfEnums( - key=[ - EnumClass("-efg") - ], - ) - try: - # Additional Properties with Array of Enums - api_response = api_instance.additional_properties_with_array_of_enums( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->additional_properties_with_array_of_enums: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#additional_properties_with_array_of_enums.ApiResponseFor200) | Got object with additional properties with array of enums - -#### additional_properties_with_array_of_enums.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AdditionalPropertiesWithArrayOfEnums**](../../models/AdditionalPropertiesWithArrayOfEnums.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **array_model** - -> AnimalFarm array_model() - - - -Test serialization of ArrayModel - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.animal_farm import AnimalFarm -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = AnimalFarm([ - Animal() - ]) - try: - api_response = api_instance.array_model( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->array_model: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnimalFarm**](../../models/AnimalFarm.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#array_model.ApiResponseFor200) | Output model - -#### array_model.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**AnimalFarm**](../../models/AnimalFarm.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **array_of_enums** - -> ArrayOfEnums array_of_enums() - -Array of Enums - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.array_of_enums import ArrayOfEnums -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = ArrayOfEnums([ - StringEnum("placed") - ]) - try: - # Array of Enums - api_response = api_instance.array_of_enums( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->array_of_enums: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#array_of_enums.ApiResponseFor200) | Got named array of enums - -#### array_of_enums.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ArrayOfEnums**](../../models/ArrayOfEnums.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **body_with_file_schema** - -> body_with_file_schema(file_schema_test_class) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.file_schema_test_class import FileSchemaTestClass -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - body = FileSchemaTestClass( - file=File( - source_uri="source_uri_example", - ), - files=[ - File() - ], - ) - try: - api_response = api_instance.body_with_file_schema( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->body_with_file_schema: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**FileSchemaTestClass**](../../models/FileSchemaTestClass.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#body_with_file_schema.ApiResponseFor200) | Success - -#### body_with_file_schema.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **body_with_query_params** - -> body_with_query_params(queryuser) - - - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'query': "query_example", - } - body = User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, - ) - try: - api_response = api_instance.body_with_query_params( - query_params=query_params, - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->body_with_query_params: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query | QuerySchema | | - - -# QuerySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#body_with_query_params.ApiResponseFor200) | Success - -#### body_with_query_params.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **boolean** - -> bool boolean() - - - -Test serialization of outer boolean types - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = True - try: - api_response = api_instance.boolean( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->boolean: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#boolean.ApiResponseFor200) | Output boolean - -#### boolean.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **case_sensitive_params** - -> case_sensitive_params(some_varsome_var2some_var3) - - - -Ensures that original naming is used in endpoint params, that way we won't have collisions - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'someVar': "someVar_example", - 'SomeVar': "SomeVar_example", - 'some_var': "some_var_example", - } - try: - api_response = api_instance.case_sensitive_params( - query_params=query_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->case_sensitive_params: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -someVar | SomeVarSchema | | -SomeVar | SomeVarSchema | | -some_var | SomeVarSchema | | - - -# SomeVarSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SomeVarSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SomeVarSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#case_sensitive_params.ApiResponseFor200) | Success - -#### case_sensitive_params.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **client_model** - -> Client client_model(client) - -To test \"client\" model - -To test \"client\" model - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.client import Client -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - body = Client( - client="client_example", - ) - try: - # To test \"client\" model - api_response = api_instance.client_model( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->client_model: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#client_model.ApiResponseFor200) | successful operation - -#### client_model.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **composed_one_of_different_types** - -> ComposedOneOfDifferentTypes composed_one_of_different_types() - - - -Test serialization of object with $refed properties - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = ComposedOneOfDifferentTypes(None) - try: - api_response = api_instance.composed_one_of_different_types( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->composed_one_of_different_types: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#composed_one_of_different_types.ApiResponseFor200) | Output model - -#### composed_one_of_different_types.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ComposedOneOfDifferentTypes**](../../models/ComposedOneOfDifferentTypes.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_coffee** - -> delete_coffee(id) - -Delete coffee - -Delete the coffee identified by the given id, (delete without request body) - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'id': "id_example", - } - try: - # Delete coffee - api_response = api_instance.delete_coffee( - path_params=path_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->delete_coffee: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -id | IdSchema | | - -# IdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_coffee.ApiResponseFor200) | OK -202 | [ApiResponseFor202](#delete_coffee.ApiResponseFor202) | header only -default | [ApiResponseForDefault](#delete_coffee.ApiResponseForDefault) | Unexpected error - -#### delete_coffee.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_coffee.ApiResponseFor202 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | ResponseHeadersFor202 | | -#### ResponseHeadersFor202 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -X-Rate-Limit | XRateLimitSchema | | optional - -# XRateLimitSchema - -calls per hour allowed by the user - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | calls per hour allowed by the user | value must be numeric and storable in decimal.Decimal - - -#### delete_coffee.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **endpoint_parameters** - -> endpoint_parameters() - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -* Basic Authentication (http_basic_test): -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure HTTP basic authorization: http_basic_test -configuration = petstore_api.Configuration( - username = 'YOUR_USERNAME', - password = 'YOUR_PASSWORD' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = dict( - integer=10, - int32=20, - int64=1, - number=32.1, - _float=3.14, - double=67.8, - string="a", - pattern_without_delimiter="AUR,rZ#UM/?R,Fp^l6$ARjbhJk C>", - byte='YQ==', - binary=open('/path/to/file', 'rb'), - date="1970-01-01", - date_time="2020-02-02T20:20:20.222220Z", - password="password_example", - callback="callback_example", - ) - try: - # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - api_response = api_instance.endpoint_parameters( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->endpoint_parameters: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationXWwwFormUrlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**number** | decimal.Decimal, int, float, | decimal.Decimal, | None | -**pattern_without_delimiter** | str, | str, | None | -**byte** | str, | str, | None | -**double** | decimal.Decimal, int, float, | decimal.Decimal, | None | value must be a 64 bit float -**integer** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] -**int32** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 32 bit integer -**int64** | decimal.Decimal, int, | decimal.Decimal, | None | [optional] value must be a 64 bit integer -**float** | decimal.Decimal, int, float, | decimal.Decimal, | None | [optional] value must be a 32 bit float -**string** | str, | str, | None | [optional] -**binary** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | None | [optional] -**date** | str, date, | str, | None | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**dateTime** | str, datetime, | str, | None | [optional] if omitted the server will use the default value of 2010-02-01T10:20:10.11111+01:00value must conform to RFC-3339 date-time -**password** | str, | str, | None | [optional] -**callback** | str, | str, | None | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#endpoint_parameters.ApiResponseFor200) | Success -404 | [ApiResponseFor404](#endpoint_parameters.ApiResponseFor404) | User not found - -#### endpoint_parameters.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### endpoint_parameters.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[http_basic_test](../../../README.md#http_basic_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **enum_parameters** - -> enum_parameters() - -To test enum parameters - -To test enum parameters - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - query_params = { - 'enum_query_string_array': [ - "$" - ], - 'enum_query_string': "-efg", - 'enum_query_integer': 1, - 'enum_query_double': 1.1, - } - header_params = { - 'enum_header_string_array': [ - "$" - ], - 'enum_header_string': "-efg", - } - body = dict( - enum_form_string_array=[ - "$" - ], - enum_form_string="-efg", - ) - try: - # To test enum parameters - api_response = api_instance.enum_parameters( - query_params=query_params, - header_params=header_params, - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->enum_parameters: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationXWwwFormUrlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[enum_form_string_array](#enum_form_string_array)** | list, tuple, | tuple, | Form parameter enum test (string array) | [optional] -**enum_form_string** | str, | str, | Form parameter enum test (string) | [optional] must be one of ["_abc", "-efg", "(xyz)", ] if omitted the server will use the default value of "-efg" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# enum_form_string_array - -Form parameter enum test (string array) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | Form parameter enum test (string array) | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of [">", "$", ] if omitted the server will use the default value of "$" - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -enum_query_string_array | EnumQueryStringArraySchema | | optional -enum_query_string | EnumQueryStringSchema | | optional -enum_query_integer | EnumQueryIntegerSchema | | optional -enum_query_double | EnumQueryDoubleSchema | | optional - - -# EnumQueryStringArraySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of [">", "$", ] if omitted the server will use the default value of "$" - -# EnumQueryStringSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["_abc", "-efg", "(xyz)", ] if omitted the server will use the default value of "-efg" - -# EnumQueryIntegerSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | must be one of [1, -2, ] value must be a 32 bit integer - -# EnumQueryDoubleSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | must be one of [1.1, -1.2, ] value must be a 64 bit float - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -enum_header_string_array | EnumHeaderStringArraySchema | | optional -enum_header_string | EnumHeaderStringSchema | | optional - -# EnumHeaderStringArraySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of [">", "$", ] if omitted the server will use the default value of "$" - -# EnumHeaderStringSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["_abc", "-efg", "(xyz)", ] if omitted the server will use the default value of "-efg" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#enum_parameters.ApiResponseFor200) | Success -404 | [ApiResponseFor404](#enum_parameters.ApiResponseFor404) | Not found - -#### enum_parameters.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### enum_parameters.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **fake_health_get** - -> HealthCheckResult fake_health_get() - -Health check endpoint - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.health_check_result import HealthCheckResult -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Health check endpoint - api_response = api_instance.fake_health_get() - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->fake_health_get: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#fake_health_get.ApiResponseFor200) | The instance started successfully - -#### fake_health_get.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**HealthCheckResult**](../../models/HealthCheckResult.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **group_parameters** - -> group_parameters(required_string_grouprequired_boolean_grouprequired_int64_group) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -* Bearer (JWT) Authentication (bearer_test): -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (JWT): bearer_test -configuration = petstore_api.Configuration( - access_token = 'YOUR_BEARER_TOKEN' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'required_string_group': 1, - 'required_int64_group': 1, - } - header_params = { - 'required_boolean_group': True, - } - try: - # Fake endpoint to test group parameters (optional) - api_response = api_instance.group_parameters( - query_params=query_params, - header_params=header_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->group_parameters: %s\n" % e) - - # example passing only optional values - query_params = { - 'required_string_group': 1, - 'required_int64_group': 1, - 'string_group': 1, - 'int64_group': 1, - } - header_params = { - 'required_boolean_group': True, - 'boolean_group': True, - } - try: - # Fake endpoint to test group parameters (optional) - api_response = api_instance.group_parameters( - query_params=query_params, - header_params=header_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->group_parameters: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -required_string_group | RequiredStringGroupSchema | | -required_int64_group | RequiredInt64GroupSchema | | -string_group | StringGroupSchema | | optional -int64_group | Int64GroupSchema | | optional - - -# RequiredStringGroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# RequiredInt64GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# StringGroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# Int64GroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -required_boolean_group | RequiredBooleanGroupSchema | | -boolean_group | BooleanGroupSchema | | optional - -# RequiredBooleanGroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# BooleanGroupSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#group_parameters.ApiResponseFor200) | succeeded - -#### group_parameters.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[bearer_test](../../../README.md#bearer_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **inline_additional_properties** - -> inline_additional_properties(request_body) - -test inline additionalProperties - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - body = dict( - "key": "key_example", - ) - try: - # test inline additionalProperties - api_response = api_instance.inline_additional_properties( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->inline_additional_properties: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#inline_additional_properties.ApiResponseFor200) | successful operation - -#### inline_additional_properties.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **inline_composition** - -> bool, date, datetime, dict, float, int, list, str, none_type inline_composition() - -testing composed schemas at inline locations - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - query_params = { - 'compositionAtRoot': None, - 'compositionInProperty': dict( - some_prop=None, - ), - } - body = None - try: - # testing composed schemas at inline locations - api_response = api_instance.inline_composition( - query_params=query_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->inline_composition: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', 'multipart/form-data', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[someProp](#someProp)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# someProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -compositionAtRoot | CompositionAtRootSchema | | optional -compositionInProperty | CompositionInPropertySchema | | optional - - -# CompositionAtRootSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# CompositionInPropertySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[someProp](#someProp)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# someProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#inline_composition.ApiResponseFor200) | success - -#### inline_composition.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, SchemaFor200ResponseBodyMultipartFormData, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SchemaFor200ResponseBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[someProp](#someProp)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# someProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **json_form_data** - -> json_form_data() - -test json serialization of form data - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = dict( - param="param_example", - param2="param2_example", - ) - try: - # test json serialization of form data - api_response = api_instance.json_form_data( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->json_form_data: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationXWwwFormUrlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**param** | str, | str, | field1 | -**param2** | str, | str, | field2 | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#json_form_data.ApiResponseFor200) | successful operation - -#### json_form_data.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **json_patch** - -> json_patch() - -json patch - -json patch route with a requestBody - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.json_patch_request import JSONPatchRequest -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = JSONPatchRequest([ - None - ]) - try: - # json patch - api_response = api_instance.json_patch( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->json_patch: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json-patch+json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJsonPatchjson -Type | Description | Notes -------------- | ------------- | ------------- -[**JSONPatchRequest**](../../models/JSONPatchRequest.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#json_patch.ApiResponseFor200) | OK - -#### json_patch.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **json_with_charset** - -> bool, date, datetime, dict, float, int, list, str, none_type json_with_charset() - -json with charset tx and rx - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = None - try: - # json with charset tx and rx - api_response = api_instance.json_with_charset( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->json_with_charset: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json; charset=utf-8' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json; charset=utf-8', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJsonCharsetutf8 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#json_with_charset.ApiResponseFor200) | success - -#### json_with_charset.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJsonCharsetutf8, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJsonCharsetutf8 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **mammal** - -> Mammal mammal(mammal) - - - -Test serialization of mammals - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.mammal import Mammal -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - body = Mammal( - has_baleen=True, - has_teeth=True, - class_name="whale", - ) - try: - api_response = api_instance.mammal( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->mammal: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Mammal**](../../models/Mammal.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#mammal.ApiResponseFor200) | Output mammal - -#### mammal.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Mammal**](../../models/Mammal.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **number_with_validations** - -> NumberWithValidations number_with_validations() - - - -Test serialization of outer number types - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.number_with_validations import NumberWithValidations -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = NumberWithValidations(10) - try: - api_response = api_instance.number_with_validations( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->number_with_validations: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NumberWithValidations**](../../models/NumberWithValidations.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#number_with_validations.ApiResponseFor200) | Output number - -#### number_with_validations.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NumberWithValidations**](../../models/NumberWithValidations.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **object_in_query** - -> object_in_query() - -user list - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - query_params = { - 'mapBean': dict( - keyword="keyword_example", - ), - } - try: - # user list - api_response = api_instance.object_in_query( - query_params=query_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->object_in_query: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -mapBean | MapBeanSchema | | optional - - -# MapBeanSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**keyword** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#object_in_query.ApiResponseFor200) | ok - -#### object_in_query.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **object_model_with_ref_props** - -> ObjectModelWithRefProps object_model_with_ref_props() - - - -Test serialization of object with $refed properties - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = ObjectModelWithRefProps( - my_number=NumberWithValidations(10), - my_string="my_string_example", - my_boolean=True, - ) - try: - api_response = api_instance.object_model_with_ref_props( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#object_model_with_ref_props.ApiResponseFor200) | Output model - -#### object_model_with_ref_props.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ObjectModelWithRefProps**](../../models/ObjectModelWithRefProps.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **parameter_collisions** - -> bool, date, datetime, dict, float, int, list, str, none_type parameter_collisions(_3a_b5ab2_self3a_b6) - -parameter collision case - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - '1': "1_example", - 'aB': "aB_example", - 'Ab': "Ab_example", - 'self': "self_example", - 'A-B': "A-B_example", - } - query_params = { - } - cookie_params = { - } - header_params = { - } - try: - # parameter collision case - api_response = api_instance.parameter_collisions( - path_params=path_params, - query_params=query_params, - header_params=header_params, - cookie_params=cookie_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) - - # example passing only optional values - path_params = { - '1': "1_example", - 'aB': "aB_example", - 'Ab': "Ab_example", - 'self': "self_example", - 'A-B': "A-B_example", - } - query_params = { - '1': "1_example", - 'aB': "aB_example", - 'Ab': "Ab_example", - 'self': "self_example", - 'A-B': "A-B_example", - } - cookie_params = { - '1': "1_example", - 'aB': "aB_example", - 'Ab': "Ab_example", - 'self': "self_example", - 'A-B': "A-B_example", - } - header_params = { - '1': "1_example", - 'aB': "aB_example", - 'self': "self_example", - 'A-B': "A-B_example", - } - body = None - try: - # parameter collision case - api_response = api_instance.parameter_collisions( - path_params=path_params, - query_params=query_params, - header_params=header_params, - cookie_params=cookie_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->parameter_collisions: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -cookie_params | RequestCookieParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -Ab | AbSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional - - -# Model1Schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AbSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ModelSelfSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional - -# Model1Schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ModelSelfSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | -aB | ABSchema | | -Ab | AbSchema | | -self | ModelSelfSchema | | -A-B | ABSchema | | - -# Model1Schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AbSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ModelSelfSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### cookie_params -#### RequestCookieParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -1 | Model1Schema | | optional -aB | ABSchema | | optional -Ab | AbSchema | | optional -self | ModelSelfSchema | | optional -A-B | ABSchema | | optional - -# Model1Schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AbSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ModelSelfSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ABSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#parameter_collisions.ApiResponseFor200) | success - -#### parameter_collisions.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **query_param_with_json_content_type** - -> bool, date, datetime, dict, float, int, list, str, none_type query_param_with_json_content_type(some_param) - -query param with json content-type - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'someParam': , - } - try: - # query param with json content-type - api_response = api_instance.query_param_with_json_content_type( - query_params=query_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->query_param_with_json_content_type: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -someParam | | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#query_param_with_json_content_type.ApiResponseFor200) | success - -#### query_param_with_json_content_type.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **query_parameter_collection_format** - -> query_parameter_collection_format(pipeioutilhttpurlcontextref_param) - - - -To test the collection format in query parameters - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.string_with_validation import StringWithValidation -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'pipe': [ - "pipe_example" - ], - 'ioutil': [ - "ioutil_example" - ], - 'http': [ - "http_example" - ], - 'url': [ - "url_example" - ], - 'context': [ - "context_example" - ], - 'refParam': StringWithValidation("refParam_example"), - } - try: - api_response = api_instance.query_parameter_collection_format( - query_params=query_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->query_parameter_collection_format: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -pipe | PipeSchema | | -ioutil | IoutilSchema | | -http | HttpSchema | | -url | UrlSchema | | -context | ContextSchema | | -refParam | RefParamSchema | | - - -# PipeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# IoutilSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# HttpSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# UrlSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# ContextSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# RefParamSchema -Type | Description | Notes -------------- | ------------- | ------------- -[**StringWithValidation**](../../models/StringWithValidation.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#query_parameter_collection_format.ApiResponseFor200) | Success - -#### query_parameter_collection_format.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **ref_object_in_query** - -> ref_object_in_query() - -user list - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.foo import Foo -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - query_params = { - 'mapBean': Foo( - bar="bar", - ), - } - try: - # user list - api_response = api_instance.ref_object_in_query( - query_params=query_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->ref_object_in_query: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -mapBean | MapBeanSchema | | optional - - -# MapBeanSchema -Type | Description | Notes -------------- | ------------- | ------------- -[**Foo**](../../models/Foo.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#ref_object_in_query.ApiResponseFor200) | ok - -#### ref_object_in_query.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **response_without_schema** - -> response_without_schema() - -receives a response without schema - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # receives a response without schema - api_response = api_instance.response_without_schema() - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->response_without_schema: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#response_without_schema.ApiResponseFor200) | contents without schema definition - -#### response_without_schema.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[Unset, Unset, ] | | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **string** - -> str string() - - - -Test serialization of outer string types - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = "body_example" - try: - api_response = api_instance.string( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->string: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#string.ApiResponseFor200) | Output string - -#### string.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **string_enum** - -> StringEnum string_enum() - - - -Test serialization of outer enum - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.string_enum import StringEnum -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = StringEnum("placed") - try: - api_response = api_instance.string_enum( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->string_enum: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StringEnum**](../../models/StringEnum.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#string_enum.ApiResponseFor200) | Output enum - -#### string_enum.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**StringEnum**](../../models/StringEnum.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_download_file** - -> file_type upload_download_file(body) - -uploads a file and downloads a file using application/octet-stream - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only required values which don't have defaults set - body = open('/path/to/file', 'rb') - try: - # uploads a file and downloads a file using application/octet-stream - api_response = api_instance.upload_download_file( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->upload_download_file: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationOctetStream] | required | -content_type | str | optional, default is 'application/octet-stream' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationOctetStream - -file to upload - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_download_file.ApiResponseFor200) | successful operation - -#### upload_download_file.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationOctetStream - -file to download - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to download | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_file** - -> ApiResponse upload_file() - -uploads a file using multipart/form-data - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.api_response import ApiResponse -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) - try: - # uploads a file using multipart/form-data - api_response = api_instance.upload_file( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->upload_file: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_file.ApiResponseFor200) | successful operation - -#### upload_file.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ApiResponse**](../../models/ApiResponse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_files** - -> ApiResponse upload_files() - -uploads files using multipart/form-data - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import fake_api -from petstore_api.model.api_response import ApiResponse -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_api.FakeApi(api_client) - - # example passing only optional values - body = dict( - files=[ - open('/path/to/file', 'rb') - ], - ) - try: - # uploads files using multipart/form-data - api_response = api_instance.upload_files( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeApi->upload_files: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[files](#files)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# files - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_files.ApiResponseFor200) | successful operation - -#### upload_files.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ApiResponse**](../../models/ApiResponse.md) | | - - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md deleted file mode 100644 index cfcab918553..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/FakeClassnameTags123Api.md +++ /dev/null @@ -1,104 +0,0 @@ - -# petstore_api.apis.tags.fake_classname_tags123_api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**classname**](#classname) | **patch** /fake_classname_test | To test class name in snake case - -# **classname** - -> Client classname(client) - -To test class name in snake case - -To test class name in snake case - -### Example - -* Api Key Authentication (api_key_query): -```python -import petstore_api -from petstore_api.apis.tags import fake_classname_tags123_api -from petstore_api.model.client import Client -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key_query -configuration.api_key['api_key_query'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key_query'] = 'Bearer' -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = fake_classname_tags123_api.FakeClassnameTags123Api(api_client) - - # example passing only required values which don't have defaults set - body = Client( - client="client_example", - ) - try: - # To test class name in snake case - api_response = api_instance.classname( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling FakeClassnameTags123Api->classname: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#classname.ApiResponseFor200) | successful operation - -#### classname.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Client**](../../models/Client.md) | | - - -### Authorization - -[api_key_query](../../../README.md#api_key_query) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md deleted file mode 100644 index f03eafaa04f..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/PetApi.md +++ /dev/null @@ -1,1402 +0,0 @@ - -# petstore_api.apis.tags.pet_api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_pet**](#add_pet) | **post** /pet | Add a new pet to the store -[**delete_pet**](#delete_pet) | **delete** /pet/{petId} | Deletes a pet -[**find_pets_by_status**](#find_pets_by_status) | **get** /pet/findByStatus | Finds Pets by status -[**find_pets_by_tags**](#find_pets_by_tags) | **get** /pet/findByTags | Finds Pets by tags -[**get_pet_by_id**](#get_pet_by_id) | **get** /pet/{petId} | Find pet by ID -[**update_pet**](#update_pet) | **put** /pet | Update an existing pet -[**update_pet_with_form**](#update_pet_with_form) | **post** /pet/{petId} | Updates a pet in the store with form data -[**upload_file_with_required_file**](#upload_file_with_required_file) | **post** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -[**upload_image**](#upload_image) | **post** /pet/{petId}/uploadImage | uploads an image - -# **add_pet** - -> add_pet(pet) - -Add a new pet to the store - -Add a new pet to the store - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.pet import Pet -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) - -# Configure HTTP message signature: http_signature_test -# The HTTP Signature Header mechanism that can be used by a client to -# authenticate the sender of a message and ensure that particular headers -# have not been modified in transit. -# -# You can specify the signing key-id, private key path, signing scheme, -# signing algorithm, list of signed headers and signature max validity. -# The 'key_id' parameter is an opaque string that the API server can use -# to lookup the client and validate the signature. -# The 'private_key_path' parameter should be the path to a file that -# contains a DER or base-64 encoded private key. -# The 'private_key_passphrase' parameter is optional. Set the passphrase -# if the private key is encrypted. -# The 'signed_headers' parameter is used to specify the list of -# HTTP headers included when generating the signature for the message. -# You can specify HTTP headers that you want to protect with a cryptographic -# signature. Note that proxies may add, modify or remove HTTP headers -# for legitimate reasons, so you should only add headers that you know -# will not be modified. For example, if you want to protect the HTTP request -# body, you can specify the Digest header. In that case, the client calculates -# the digest of the HTTP request body and includes the digest in the message -# signature. -# The 'signature_max_validity' parameter is optional. It is configured as a -# duration to express when the signature ceases to be valid. The client calculates -# the expiration date every time it generates the cryptographic signature -# of an HTTP request. The API server may have its own security policy -# that controls the maximum validity of the signature. The client max validity -# must be lower than the server max validity. -# The time on the client and server must be synchronized, otherwise the -# server may reject the client signature. -# -# The client must use a combination of private key, signing scheme, -# signing algorithm and hash algorithm that matches the security policy of -# the API server. -# -# See petstore_api.signing for a list of all supported parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - signing_info = petstore_api.signing.HttpSigningConfiguration( - key_id = 'my-key-id', - private_key_path = 'private_key.pem', - private_key_passphrase = 'YOUR_PASSPHRASE', - signing_scheme = petstore_api.signing.SCHEME_HS2019, - signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, - hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, - signed_headers = [ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - body = Pet( - id=1, - category=Category( - id=1, - name="default-name", - ), - name="doggie", - photo_urls=[ - "photo_urls_example" - ], - tags=[ - Tag( - id=1, - name="name_example", - ) - ], - status="available", - ) - try: - # Add a new pet to the store - api_response = api_instance.add_pet( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->add_pet: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -host_index | typing.Optional[int] | default is None | Allows one to select a different host -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -# SchemaForRequestBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#add_pet.ApiResponseFor200) | Ok -405 | [ApiResponseFor405](#add_pet.ApiResponseFor405) | Invalid input - -#### add_pet.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### add_pet.ApiResponseFor405 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth), [http_signature_test](../../../README.md#http_signature_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_pet** - -> delete_pet(pet_id) - -Deletes a pet - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'petId': 1, - } - header_params = { - } - try: - # Deletes a pet - api_response = api_instance.delete_pet( - path_params=path_params, - header_params=header_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - header_params = { - 'api_key': "api_key_example", - } - try: - # Deletes a pet - api_response = api_instance.delete_pet( - path_params=path_params, - header_params=header_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->delete_pet: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -header_params | RequestHeaderParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### header_params -#### RequestHeaderParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -api_key | ApiKeySchema | | optional - -# ApiKeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | - -# PetIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#delete_pet.ApiResponseFor400) | Invalid pet value - -#### delete_pet.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_pets_by_status** - -> [Pet] find_pets_by_status(status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.pet import Pet -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) - -# Configure HTTP message signature: http_signature_test -# The HTTP Signature Header mechanism that can be used by a client to -# authenticate the sender of a message and ensure that particular headers -# have not been modified in transit. -# -# You can specify the signing key-id, private key path, signing scheme, -# signing algorithm, list of signed headers and signature max validity. -# The 'key_id' parameter is an opaque string that the API server can use -# to lookup the client and validate the signature. -# The 'private_key_path' parameter should be the path to a file that -# contains a DER or base-64 encoded private key. -# The 'private_key_passphrase' parameter is optional. Set the passphrase -# if the private key is encrypted. -# The 'signed_headers' parameter is used to specify the list of -# HTTP headers included when generating the signature for the message. -# You can specify HTTP headers that you want to protect with a cryptographic -# signature. Note that proxies may add, modify or remove HTTP headers -# for legitimate reasons, so you should only add headers that you know -# will not be modified. For example, if you want to protect the HTTP request -# body, you can specify the Digest header. In that case, the client calculates -# the digest of the HTTP request body and includes the digest in the message -# signature. -# The 'signature_max_validity' parameter is optional. It is configured as a -# duration to express when the signature ceases to be valid. The client calculates -# the expiration date every time it generates the cryptographic signature -# of an HTTP request. The API server may have its own security policy -# that controls the maximum validity of the signature. The client max validity -# must be lower than the server max validity. -# The time on the client and server must be synchronized, otherwise the -# server may reject the client signature. -# -# The client must use a combination of private key, signing scheme, -# signing algorithm and hash algorithm that matches the security policy of -# the API server. -# -# See petstore_api.signing for a list of all supported parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - signing_info = petstore_api.signing.HttpSigningConfiguration( - key_id = 'my-key-id', - private_key_path = 'private_key.pem', - private_key_passphrase = 'YOUR_PASSPHRASE', - signing_scheme = petstore_api.signing.SCHEME_HS2019, - signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, - hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, - signed_headers = [ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'status': [ - "available" - ], - } - try: - # Finds Pets by status - api_response = api_instance.find_pets_by_status( - query_params=query_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_status: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -status | StatusSchema | | - - -# StatusSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["available", "pending", "sold", ] if omitted the server will use the default value of "available" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_pets_by_status.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#find_pets_by_status.ApiResponseFor400) | Invalid status value - -#### find_pets_by_status.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | - -#### find_pets_by_status.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth), [http_signature_test](../../../README.md#http_signature_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_pets_by_tags** - -> [Pet] find_pets_by_tags(tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.pet import Pet -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) - -# Configure HTTP message signature: http_signature_test -# The HTTP Signature Header mechanism that can be used by a client to -# authenticate the sender of a message and ensure that particular headers -# have not been modified in transit. -# -# You can specify the signing key-id, private key path, signing scheme, -# signing algorithm, list of signed headers and signature max validity. -# The 'key_id' parameter is an opaque string that the API server can use -# to lookup the client and validate the signature. -# The 'private_key_path' parameter should be the path to a file that -# contains a DER or base-64 encoded private key. -# The 'private_key_passphrase' parameter is optional. Set the passphrase -# if the private key is encrypted. -# The 'signed_headers' parameter is used to specify the list of -# HTTP headers included when generating the signature for the message. -# You can specify HTTP headers that you want to protect with a cryptographic -# signature. Note that proxies may add, modify or remove HTTP headers -# for legitimate reasons, so you should only add headers that you know -# will not be modified. For example, if you want to protect the HTTP request -# body, you can specify the Digest header. In that case, the client calculates -# the digest of the HTTP request body and includes the digest in the message -# signature. -# The 'signature_max_validity' parameter is optional. It is configured as a -# duration to express when the signature ceases to be valid. The client calculates -# the expiration date every time it generates the cryptographic signature -# of an HTTP request. The API server may have its own security policy -# that controls the maximum validity of the signature. The client max validity -# must be lower than the server max validity. -# The time on the client and server must be synchronized, otherwise the -# server may reject the client signature. -# -# The client must use a combination of private key, signing scheme, -# signing algorithm and hash algorithm that matches the security policy of -# the API server. -# -# See petstore_api.signing for a list of all supported parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - signing_info = petstore_api.signing.HttpSigningConfiguration( - key_id = 'my-key-id', - private_key_path = 'private_key.pem', - private_key_passphrase = 'YOUR_PASSPHRASE', - signing_scheme = petstore_api.signing.SCHEME_HS2019, - signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, - hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, - signed_headers = [ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'tags': [ - "tags_example" - ], - } - try: - # Finds Pets by tags - api_response = api_instance.find_pets_by_tags( - query_params=query_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -tags | TagsSchema | | - - -# TagsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_pets_by_tags.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#find_pets_by_tags.ApiResponseFor400) | Invalid tag value - -#### find_pets_by_tags.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | [**Pet**]({{complexTypePrefix}}Pet.md) | | - -#### find_pets_by_tags.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth), [http_signature_test](../../../README.md#http_signature_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_pet_by_id** - -> Pet get_pet_by_id(pet_id) - -Find pet by ID - -Returns a single pet - -### Example - -* Api Key Authentication (api_key): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.pet import Pet -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'petId': 1, - } - try: - # Find pet by ID - api_response = api_instance.get_pet_by_id( - path_params=path_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->get_pet_by_id: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | - -# PetIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_pet_by_id.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#get_pet_by_id.ApiResponseFor400) | Invalid ID supplied -404 | [ApiResponseFor404](#get_pet_by_id.ApiResponseFor404) | Pet not found - -#### get_pet_by_id.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -#### get_pet_by_id.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### get_pet_by_id.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[api_key](../../../README.md#api_key) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_pet** - -> update_pet(pet) - -Update an existing pet - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.pet import Pet -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) - -# Configure HTTP message signature: http_signature_test -# The HTTP Signature Header mechanism that can be used by a client to -# authenticate the sender of a message and ensure that particular headers -# have not been modified in transit. -# -# You can specify the signing key-id, private key path, signing scheme, -# signing algorithm, list of signed headers and signature max validity. -# The 'key_id' parameter is an opaque string that the API server can use -# to lookup the client and validate the signature. -# The 'private_key_path' parameter should be the path to a file that -# contains a DER or base-64 encoded private key. -# The 'private_key_passphrase' parameter is optional. Set the passphrase -# if the private key is encrypted. -# The 'signed_headers' parameter is used to specify the list of -# HTTP headers included when generating the signature for the message. -# You can specify HTTP headers that you want to protect with a cryptographic -# signature. Note that proxies may add, modify or remove HTTP headers -# for legitimate reasons, so you should only add headers that you know -# will not be modified. For example, if you want to protect the HTTP request -# body, you can specify the Digest header. In that case, the client calculates -# the digest of the HTTP request body and includes the digest in the message -# signature. -# The 'signature_max_validity' parameter is optional. It is configured as a -# duration to express when the signature ceases to be valid. The client calculates -# the expiration date every time it generates the cryptographic signature -# of an HTTP request. The API server may have its own security policy -# that controls the maximum validity of the signature. The client max validity -# must be lower than the server max validity. -# The time on the client and server must be synchronized, otherwise the -# server may reject the client signature. -# -# The client must use a combination of private key, signing scheme, -# signing algorithm and hash algorithm that matches the security policy of -# the API server. -# -# See petstore_api.signing for a list of all supported parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - signing_info = petstore_api.signing.HttpSigningConfiguration( - key_id = 'my-key-id', - private_key_path = 'private_key.pem', - private_key_passphrase = 'YOUR_PASSPHRASE', - signing_scheme = petstore_api.signing.SCHEME_HS2019, - signing_algorithm = petstore_api.signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, - hash_algorithm = petstore_api.signing.SCHEME_RSA_SHA256, - signed_headers = [ - petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, - 'Content-Type', - 'Content-Length', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - body = Pet( - id=1, - category=Category( - id=1, - name="default-name", - ), - name="doggie", - photo_urls=[ - "photo_urls_example" - ], - tags=[ - Tag( - id=1, - name="name_example", - ) - ], - status="available", - ) - try: - # Update an existing pet - api_response = api_instance.update_pet( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXml] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -host_index | typing.Optional[int] | default is None | Allows one to select a different host -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -# SchemaForRequestBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**Pet**](../../models/Pet.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#update_pet.ApiResponseFor400) | Invalid ID supplied -404 | [ApiResponseFor404](#update_pet.ApiResponseFor404) | Pet not found -405 | [ApiResponseFor405](#update_pet.ApiResponseFor405) | Validation exception - -#### update_pet.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### update_pet.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### update_pet.ApiResponseFor405 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth), [http_signature_test](../../../README.md#http_signature_test) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_pet_with_form** - -> update_pet_with_form(pet_id) - -Updates a pet in the store with form data - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'petId': 1, - } - try: - # Updates a pet in the store with form data - api_response = api_instance.update_pet_with_form( - path_params=path_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - name="name_example", - status="status_example", - ) - try: - # Updates a pet in the store with form data - api_response = api_instance.update_pet_with_form( - path_params=path_params, - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->update_pet_with_form: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/x-www-form-urlencoded' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationXWwwFormUrlencoded - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | Updated name of the pet | [optional] -**status** | str, | str, | Updated status of the pet | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | - -# PetIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -405 | [ApiResponseFor405](#update_pet_with_form.ApiResponseFor405) | Invalid input - -#### update_pet_with_form.ApiResponseFor405 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_file_with_required_file** - -> ApiResponse upload_file_with_required_file(pet_id) - -uploads an image (required) - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.api_response import ApiResponse -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'petId': 1, - } - try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file( - path_params=path_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - additional_metadata="additional_metadata_example", - required_file=open('/path/to/file', 'rb'), - ) - try: - # uploads an image (required) - api_response = api_instance.upload_file_with_required_file( - path_params=path_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**requiredFile** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | - -# PetIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_file_with_required_file.ApiResponseFor200) | successful operation - -#### upload_file_with_required_file.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ApiResponse**](../../models/ApiResponse.md) | | - - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **upload_image** - -> ApiResponse upload_image(pet_id) - -uploads an image - -### Example - -* OAuth Authentication (petstore_auth): -```python -import petstore_api -from petstore_api.apis.tags import pet_api -from petstore_api.model.api_response import ApiResponse -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure OAuth2 access token for authorization: petstore_auth -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2", - access_token = 'YOUR_ACCESS_TOKEN' -) -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = pet_api.PetApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'petId': 1, - } - try: - # uploads an image - api_response = api_instance.upload_image( - path_params=path_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_image: %s\n" % e) - - # example passing only optional values - path_params = { - 'petId': 1, - } - body = dict( - additional_metadata="additional_metadata_example", - file=open('/path/to/file', 'rb'), - ) - try: - # uploads an image - api_response = api_instance.upload_image( - path_params=path_params, - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling PetApi->upload_image: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**additionalMetadata** | str, | str, | Additional data to pass to server | [optional] -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | file to upload | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -petId | PetIdSchema | | - -# PetIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#upload_image.ApiResponseFor200) | successful operation - -#### upload_image.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ApiResponse**](../../models/ApiResponse.md) | | - - -### Authorization - -[petstore_auth](../../../README.md#petstore_auth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md deleted file mode 100644 index 461ab2a0b8e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/StoreApi.md +++ /dev/null @@ -1,391 +0,0 @@ - -# petstore_api.apis.tags.store_api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**delete_order**](#delete_order) | **delete** /store/order/{order_id} | Delete purchase order by ID -[**get_inventory**](#get_inventory) | **get** /store/inventory | Returns pet inventories by status -[**get_order_by_id**](#get_order_by_id) | **get** /store/order/{order_id} | Find purchase order by ID -[**place_order**](#place_order) | **post** /store/order | Place an order for a pet - -# **delete_order** - -> delete_order(order_id) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import store_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = store_api.StoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'order_id': "order_id_example", - } - try: - # Delete purchase order by ID - api_response = api_instance.delete_order( - path_params=path_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling StoreApi->delete_order: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -order_id | OrderIdSchema | | - -# OrderIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#delete_order.ApiResponseFor400) | Invalid ID supplied -404 | [ApiResponseFor404](#delete_order.ApiResponseFor404) | Order not found - -#### delete_order.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_order.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_inventory** - -> {str: (int,)} get_inventory() - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -* Api Key Authentication (api_key): -```python -import petstore_api -from petstore_api.apis.tags import store_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: api_key -configuration.api_key['api_key'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['api_key'] = 'Bearer' -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = store_api.StoreApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Returns pet inventories by status - api_response = api_instance.get_inventory() - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling StoreApi->get_inventory: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_inventory.ApiResponseFor200) | successful operation - -#### get_inventory.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | decimal.Decimal, int, | decimal.Decimal, | any string name can be used but the value must be the correct type | [optional] value must be a 32 bit integer - -### Authorization - -[api_key](../../../README.md#api_key) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_order_by_id** - -> Order get_order_by_id(order_id) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import store_api -from petstore_api.model.order import Order -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = store_api.StoreApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'order_id': 1, - } - try: - # Find purchase order by ID - api_response = api_instance.get_order_by_id( - path_params=path_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling StoreApi->get_order_by_id: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -order_id | OrderIdSchema | | - -# OrderIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_order_by_id.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#get_order_by_id.ApiResponseFor400) | Invalid ID supplied -404 | [ApiResponseFor404](#get_order_by_id.ApiResponseFor404) | Order not found - -#### get_order_by_id.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**Order**](../../models/Order.md) | | - - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Order**](../../models/Order.md) | | - - -#### get_order_by_id.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### get_order_by_id.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **place_order** - -> Order place_order(order) - -Place an order for a pet - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import store_api -from petstore_api.model.order import Order -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = store_api.StoreApi(api_client) - - # example passing only required values which don't have defaults set - body = Order( - id=1, - pet_id=1, - quantity=1, - ship_date="2020-02-02T20:20:20.000222Z", - status="placed", - complete=False, - ) - try: - # Place an order for a pet - api_response = api_instance.place_order( - body=body, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling StoreApi->place_order: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Order**](../../models/Order.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#place_order.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#place_order.ApiResponseFor400) | Invalid Order - -#### place_order.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**Order**](../../models/Order.md) | | - - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**Order**](../../models/Order.md) | | - - -#### place_order.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md b/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md deleted file mode 100644 index ada88de8998..00000000000 --- a/samples/openapi3/client/petstore/python/docs/apis/tags/UserApi.md +++ /dev/null @@ -1,794 +0,0 @@ - -# petstore_api.apis.tags.user_api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_user**](#create_user) | **post** /user | Create user -[**create_users_with_array_input**](#create_users_with_array_input) | **post** /user/createWithArray | Creates list of users with given input array -[**create_users_with_list_input**](#create_users_with_list_input) | **post** /user/createWithList | Creates list of users with given input array -[**delete_user**](#delete_user) | **delete** /user/{username} | Delete user -[**get_user_by_name**](#get_user_by_name) | **get** /user/{username} | Get user by user name -[**login_user**](#login_user) | **get** /user/login | Logs user into the system -[**logout_user**](#logout_user) | **get** /user/logout | Logs out current logged in user session -[**update_user**](#update_user) | **put** /user/{username} | Updated user - -# **create_user** - -> create_user(user) - -Create user - -This can only be done by the logged in user. - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - body = User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, - ) - try: - # Create user - api_response = api_instance.create_user( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#create_user.ApiResponseForDefault) | successful operation - -#### create_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_users_with_array_input** - -> create_users_with_array_input(user) - -Creates list of users with given input array - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - body = [ - User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, - ) - ] - try: - # Creates list of users with given input array - api_response = api_instance.create_users_with_array_input( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**User**]({{complexTypePrefix}}User.md) | [**User**]({{complexTypePrefix}}User.md) | [**User**]({{complexTypePrefix}}User.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#create_users_with_array_input.ApiResponseForDefault) | successful operation - -#### create_users_with_array_input.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_users_with_list_input** - -> create_users_with_list_input(user) - -Creates list of users with given input array - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - body = [ - User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, - ) - ] - try: - # Creates list of users with given input array - api_response = api_instance.create_users_with_list_input( - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**User**]({{complexTypePrefix}}User.md) | [**User**]({{complexTypePrefix}}User.md) | [**User**]({{complexTypePrefix}}User.md) | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#create_users_with_list_input.ApiResponseForDefault) | successful operation - -#### create_users_with_list_input.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_user** - -> delete_user(username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'username': "username_example", - } - try: - # Delete user - api_response = api_instance.delete_user( - path_params=path_params, - ) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->delete_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | - -# UsernameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_user.ApiResponseFor200) | Success -404 | [ApiResponseFor404](#delete_user.ApiResponseFor404) | User not found - -#### delete_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### delete_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user_by_name** - -> User get_user_by_name(username) - -Get user by user name - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'username': "username_example", - } - try: - # Get user by user name - api_response = api_instance.get_user_by_name( - path_params=path_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->get_user_by_name: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | - -# UsernameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_user_by_name.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#get_user_by_name.ApiResponseFor400) | Invalid username supplied -404 | [ApiResponseFor404](#get_user_by_name.ApiResponseFor404) | User not found - -#### get_user_by_name.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationXml -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -#### get_user_by_name.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### get_user_by_name.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **login_user** - -> str login_user(usernamepassword) - -Logs user into the system - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'username': "username_example", - 'password': "password_example", - } - try: - # Logs user into the system - api_response = api_instance.login_user( - query_params=query_params, - ) - pprint(api_response) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->login_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/xml', 'application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | -password | PasswordSchema | | - - -# UsernameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PasswordSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#login_user.ApiResponseFor200) | successful operation -400 | [ApiResponseFor400](#login_user.ApiResponseFor400) | Invalid username/password supplied - -#### login_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationXml, SchemaFor200ResponseBodyApplicationJson, ] | | -headers | ResponseHeadersFor200 | | - -# SchemaFor200ResponseBodyApplicationXml - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | -#### ResponseHeadersFor200 - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -X-Rate-Limit | XRateLimitSchema | | optional -X-Expires-After | XExpiresAfterSchema | | optional - -# XRateLimitSchema - -calls per hour allowed by the user - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | calls per hour allowed by the user | value must be a 32 bit integer - -# XExpiresAfterSchema - -date in UTC when token expires - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, datetime, | str, | date in UTC when token expires | value must conform to RFC-3339 date-time - - -#### login_user.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **logout_user** - -> logout_user() - -Logs out current logged in user session - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # Logs out current logged in user session - api_response = api_instance.logout_user() - except petstore_api.ApiException as e: - print("Exception when calling UserApi->logout_user: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -default | [ApiResponseForDefault](#logout_user.ApiResponseForDefault) | successful operation - -#### logout_user.ApiResponseForDefault -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_user** - -> update_user(usernameuser) - -Updated user - -This can only be done by the logged in user. - -### Example - -```python -import petstore_api -from petstore_api.apis.tags import user_api -from petstore_api.model.user import User -from pprint import pprint -# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2 -# See configuration.py for a list of all supported configuration parameters. -configuration = petstore_api.Configuration( - host = "http://petstore.swagger.io:80/v2" -) - -# Enter a context with an instance of the API client -with petstore_api.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = user_api.UserApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'username': "username_example", - } - body = User( - id=1, - username="username_example", - first_name="first_name_example", - last_name="last_name_example", - email="email_example", - password="password_example", - phone="phone_example", - user_status=1, - object_with_no_declared_props=dict(), - object_with_no_declared_props_nullable=dict(), - any_type_prop=None, - any_type_except_null_prop=None, - any_type_prop_nullable=None, - ) - try: - # Updated user - api_response = api_instance.update_user( - path_params=path_params, - body=body, - ) - except petstore_api.ApiException as e: - print("Exception when calling UserApi->update_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**User**](../../models/User.md) | | - - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -username | UsernameSchema | | - -# UsernameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -400 | [ApiResponseFor400](#update_user.ApiResponseFor400) | Invalid user supplied -404 | [ApiResponseFor404](#update_user.ApiResponseFor404) | User not found - -#### update_user.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -#### update_user.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | -headers | Unset | headers were not defined | - -### Authorization - -No authorization required - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesClass.md deleted file mode 100644 index 80e4e770991..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesClass.md +++ /dev/null @@ -1,109 +0,0 @@ -# petstore_api.model.additional_properties_class.AdditionalPropertiesClass - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[map_property](#map_property)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[map_of_map_property](#map_of_map_property)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**anytype_1** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**[map_with_undeclared_properties_anytype_1](#map_with_undeclared_properties_anytype_1)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[map_with_undeclared_properties_anytype_2](#map_with_undeclared_properties_anytype_2)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[map_with_undeclared_properties_anytype_3](#map_with_undeclared_properties_anytype_3)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[empty_map](#empty_map)** | dict, frozendict.frozendict, | frozendict.frozendict, | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional] -**[map_with_undeclared_properties_string](#map_with_undeclared_properties_string)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# map_property - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -# map_of_map_property - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, | frozendict.frozendict, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -# map_with_undeclared_properties_anytype_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# map_with_undeclared_properties_anytype_2 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# map_with_undeclared_properties_anytype_3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# empty_map - -an object with no declared properties and no undeclared properties, hence it's an empty map. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | an object with no declared properties and no undeclared properties, hence it's an empty map. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- - -# map_with_undeclared_properties_string - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesValidator.md b/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesValidator.md deleted file mode 100644 index 4a386a3864c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesValidator.md +++ /dev/null @@ -1,53 +0,0 @@ -# petstore_api.model.additional_properties_validator.AdditionalPropertiesValidator - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | -[all_of_2](#all_of_2) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# all_of_2 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesWithArrayOfEnums.md b/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesWithArrayOfEnums.md deleted file mode 100644 index 22dd693183c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AdditionalPropertiesWithArrayOfEnums.md +++ /dev/null @@ -1,26 +0,0 @@ -# petstore_api.model.additional_properties_with_array_of_enums.AdditionalPropertiesWithArrayOfEnums - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | list, tuple, | tuple, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**EnumClass**](EnumClass.md) | [**EnumClass**](EnumClass.md) | [**EnumClass**](EnumClass.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Address.md b/samples/openapi3/client/petstore/python/docs/models/Address.md deleted file mode 100644 index 1ec43dfd0bc..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Address.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.address.Address - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | decimal.Decimal, int, | decimal.Decimal, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Animal.md b/samples/openapi3/client/petstore/python/docs/models/Animal.md deleted file mode 100644 index bf064d289ed..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Animal.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.animal.Animal - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**className** | str, | str, | | -**color** | str, | str, | | [optional] if omitted the server will use the default value of "red" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AnimalFarm.md b/samples/openapi3/client/petstore/python/docs/models/AnimalFarm.md deleted file mode 100644 index f1b1468e77e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AnimalFarm.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.animal_farm.AnimalFarm - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Animal**](Animal.md) | [**Animal**](Animal.md) | [**Animal**](Animal.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AnyTypeAndFormat.md b/samples/openapi3/client/petstore/python/docs/models/AnyTypeAndFormat.md deleted file mode 100644 index 812e5c6a1ee..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AnyTypeAndFormat.md +++ /dev/null @@ -1,23 +0,0 @@ -# petstore_api.model.any_type_and_format.AnyTypeAndFormat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**uuid** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be a uuid -**date** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**date-time** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must conform to RFC-3339 date-time -**number** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be numeric and storable in decimal.Decimal -**binary** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**int32** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be a 32 bit integer -**int64** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be a 64 bit integer -**double** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be a 64 bit float -**float** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] value must be a 32 bit float -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AnyTypeNotString.md b/samples/openapi3/client/petstore/python/docs/models/AnyTypeNotString.md deleted file mode 100644 index ff57ed8d213..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AnyTypeNotString.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.any_type_not_string.AnyTypeNotString - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | str, | str, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ApiResponse.md b/samples/openapi3/client/petstore/python/docs/models/ApiResponse.md deleted file mode 100644 index 578aa06cb50..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ApiResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.api_response.ApiResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**type** | str, | str, | | [optional] -**message** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Apple.md b/samples/openapi3/client/petstore/python/docs/models/Apple.md deleted file mode 100644 index 84c3ab8da58..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Apple.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.apple.Apple - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**cultivar** | str, | str, | | -**origin** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/AppleReq.md b/samples/openapi3/client/petstore/python/docs/models/AppleReq.md deleted file mode 100644 index 59e2c1b00c8..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/AppleReq.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.apple_req.AppleReq - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**cultivar** | str, | str, | | -**mealy** | bool, | BoolClass, | | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayHoldingAnyType.md b/samples/openapi3/client/petstore/python/docs/models/ArrayHoldingAnyType.md deleted file mode 100644 index 7dc14c3018e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayHoldingAnyType.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.array_holding_any_type.ArrayHoldingAnyType - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any type can be stored here | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/models/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index b3e7a281e0a..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,39 +0,0 @@ -# petstore_api.model.array_of_array_of_number_only.ArrayOfArrayOfNumberOnly - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[ArrayArrayNumber](#ArrayArrayNumber)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# ArrayArrayNumber - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayOfEnums.md b/samples/openapi3/client/petstore/python/docs/models/ArrayOfEnums.md deleted file mode 100644 index dca614b9ae6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayOfEnums.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.array_of_enums.ArrayOfEnums - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**StringEnum**](StringEnum.md) | [**StringEnum**](StringEnum.md) | [**StringEnum**](StringEnum.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/models/ArrayOfNumberOnly.md deleted file mode 100644 index 271dff52fd0..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayOfNumberOnly.md +++ /dev/null @@ -1,27 +0,0 @@ -# petstore_api.model.array_of_number_only.ArrayOfNumberOnly - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[ArrayNumber](#ArrayNumber)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# ArrayNumber - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/models/ArrayTest.md deleted file mode 100644 index 657329575ee..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayTest.md +++ /dev/null @@ -1,77 +0,0 @@ -# petstore_api.model.array_test.ArrayTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[array_of_string](#array_of_string)** | list, tuple, | tuple, | | [optional] -**[array_array_of_integer](#array_array_of_integer)** | list, tuple, | tuple, | | [optional] -**[array_array_of_model](#array_array_of_model)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# array_of_string - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# array_array_of_integer - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# array_array_of_model - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | list, tuple, | tuple, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**ReadOnlyFirst**](ReadOnlyFirst.md) | [**ReadOnlyFirst**](ReadOnlyFirst.md) | [**ReadOnlyFirst**](ReadOnlyFirst.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ArrayWithValidationsInItems.md b/samples/openapi3/client/petstore/python/docs/models/ArrayWithValidationsInItems.md deleted file mode 100644 index b81ab8cd5d6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ArrayWithValidationsInItems.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.array_with_validations_in_items.ArrayWithValidationsInItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Banana.md b/samples/openapi3/client/petstore/python/docs/models/Banana.md deleted file mode 100644 index 034c7f77709..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Banana.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.banana.Banana - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**lengthCm** | decimal.Decimal, int, float, | decimal.Decimal, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/BananaReq.md b/samples/openapi3/client/petstore/python/docs/models/BananaReq.md deleted file mode 100644 index ae53efbfe95..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/BananaReq.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.banana_req.BananaReq - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**lengthCm** | decimal.Decimal, int, float, | decimal.Decimal, | | -**sweet** | bool, | BoolClass, | | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Bar.md b/samples/openapi3/client/petstore/python/docs/models/Bar.md deleted file mode 100644 index 55aa05fa180..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Bar.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.bar.Bar - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "bar" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/BasquePig.md b/samples/openapi3/client/petstore/python/docs/models/BasquePig.md deleted file mode 100644 index b0860be169a..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/BasquePig.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.basque_pig.BasquePig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**className** | str, | str, | | must be one of ["BasquePig", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Boolean.md b/samples/openapi3/client/petstore/python/docs/models/Boolean.md deleted file mode 100644 index c2e0e952aca..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Boolean.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.boolean.Boolean - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/BooleanEnum.md b/samples/openapi3/client/petstore/python/docs/models/BooleanEnum.md deleted file mode 100644 index a84330415cb..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/BooleanEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.boolean_enum.BooleanEnum - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | must be one of [True, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Capitalization.md b/samples/openapi3/client/petstore/python/docs/models/Capitalization.md deleted file mode 100644 index cc39af70e1e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Capitalization.md +++ /dev/null @@ -1,20 +0,0 @@ -# petstore_api.model.capitalization.Capitalization - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**smallCamel** | str, | str, | | [optional] -**CapitalCamel** | str, | str, | | [optional] -**small_Snake** | str, | str, | | [optional] -**Capital_Snake** | str, | str, | | [optional] -**SCA_ETH_Flow_Points** | str, | str, | | [optional] -**ATT_NAME** | str, | str, | Name of the pet | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Cat.md b/samples/openapi3/client/petstore/python/docs/models/Cat.md deleted file mode 100644 index b5e0986f57b..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Cat.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.cat.Cat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Animal](Animal.md) | [**Animal**](Animal.md) | [**Animal**](Animal.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**declawed** | bool, | BoolClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Category.md b/samples/openapi3/client/petstore/python/docs/models/Category.md deleted file mode 100644 index 0087571a3a6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Category.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.category.Category - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | | if omitted the server will use the default value of "default-name" -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ChildCat.md b/samples/openapi3/client/petstore/python/docs/models/ChildCat.md deleted file mode 100644 index 645ea5062dd..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ChildCat.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.child_cat.ChildCat - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ParentPet](ParentPet.md) | [**ParentPet**](ParentPet.md) | [**ParentPet**](ParentPet.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ClassModel.md b/samples/openapi3/client/petstore/python/docs/models/ClassModel.md deleted file mode 100644 index b1686ebb799..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ClassModel.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.class_model.ClassModel - -Model for testing model with \"_class\" property - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | Model for testing model with \"_class\" property | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**_class** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Client.md b/samples/openapi3/client/petstore/python/docs/models/Client.md deleted file mode 100644 index e94c360dd28..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Client.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.client.Client - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**client** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComplexQuadrilateral.md b/samples/openapi3/client/petstore/python/docs/models/ComplexQuadrilateral.md deleted file mode 100644 index a00ac0d9da6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComplexQuadrilateral.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.complex_quadrilateral.ComplexQuadrilateral - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[QuadrilateralInterface](QuadrilateralInterface.md) | [**QuadrilateralInterface**](QuadrilateralInterface.md) | [**QuadrilateralInterface**](QuadrilateralInterface.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | str, | str, | | [optional] must be one of ["ComplexQuadrilateral", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedAnyOfDifferentTypesNoValidations.md b/samples/openapi3/client/petstore/python/docs/models/ComposedAnyOfDifferentTypesNoValidations.md deleted file mode 100644 index f4389c50eb2..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedAnyOfDifferentTypesNoValidations.md +++ /dev/null @@ -1,147 +0,0 @@ -# petstore_api.model.composed_any_of_different_types_no_validations.ComposedAnyOfDifferentTypesNoValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[any_of_0](#any_of_0) | dict, frozendict.frozendict, | frozendict.frozendict, | | -[any_of_1](#any_of_1) | str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD -[any_of_2](#any_of_2) | str, datetime, | str, | | value must conform to RFC-3339 date-time -[any_of_3](#any_of_3) | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | -[any_of_4](#any_of_4) | str, | str, | | -[any_of_5](#any_of_5) | str, | str, | | -[any_of_6](#any_of_6) | dict, frozendict.frozendict, | frozendict.frozendict, | | -[any_of_7](#any_of_7) | bool, | BoolClass, | | -[any_of_8](#any_of_8) | None, | NoneClass, | | -[any_of_9](#any_of_9) | list, tuple, | tuple, | | -[any_of_10](#any_of_10) | decimal.Decimal, int, float, | decimal.Decimal, | | -[any_of_11](#any_of_11) | decimal.Decimal, int, float, | decimal.Decimal, | | value must be a 32 bit float -[any_of_12](#any_of_12) | decimal.Decimal, int, float, | decimal.Decimal, | | value must be a 64 bit float -[any_of_13](#any_of_13) | decimal.Decimal, int, | decimal.Decimal, | | -[any_of_14](#any_of_14) | decimal.Decimal, int, | decimal.Decimal, | | value must be a 32 bit integer -[any_of_15](#any_of_15) | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# any_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# any_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD - -# any_of_2 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, datetime, | str, | | value must conform to RFC-3339 date-time - -# any_of_3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -# any_of_4 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# any_of_5 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# any_of_6 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# any_of_7 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -# any_of_8 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -# any_of_9 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# any_of_10 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -# any_of_11 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | value must be a 32 bit float - -# any_of_12 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | value must be a 64 bit float - -# any_of_13 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# any_of_14 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 32 bit integer - -# any_of_15 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedArray.md b/samples/openapi3/client/petstore/python/docs/models/ComposedArray.md deleted file mode 100644 index bc506aa5f8a..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedArray.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.composed_array.ComposedArray - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedBool.md b/samples/openapi3/client/petstore/python/docs/models/ComposedBool.md deleted file mode 100644 index 29ed69f72f1..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedBool.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.composed_bool.ComposedBool - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedNone.md b/samples/openapi3/client/petstore/python/docs/models/ComposedNone.md deleted file mode 100644 index df4ec85f2cc..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedNone.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.composed_none.ComposedNone - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedNumber.md b/samples/openapi3/client/petstore/python/docs/models/ComposedNumber.md deleted file mode 100644 index fa1f87c730c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedNumber.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.composed_number.ComposedNumber - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedObject.md b/samples/openapi3/client/petstore/python/docs/models/ComposedObject.md deleted file mode 100644 index ebbbaede6b7..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedObject.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.composed_object.ComposedObject - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedOneOfDifferentTypes.md b/samples/openapi3/client/petstore/python/docs/models/ComposedOneOfDifferentTypes.md deleted file mode 100644 index 0094f7e44c5..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedOneOfDifferentTypes.md +++ /dev/null @@ -1,63 +0,0 @@ -# petstore_api.model.composed_one_of_different_types.ComposedOneOfDifferentTypes - -this is a model that allows payloads of type object or number - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | this is a model that allows payloads of type object or number | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[NumberWithValidations](NumberWithValidations.md) | [**NumberWithValidations**](NumberWithValidations.md) | [**NumberWithValidations**](NumberWithValidations.md) | | -[Animal](Animal.md) | [**Animal**](Animal.md) | [**Animal**](Animal.md) | | -[one_of_2](#one_of_2) | None, | NoneClass, | | -[one_of_3](#one_of_3) | str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD -[one_of_4](#one_of_4) | dict, frozendict.frozendict, | frozendict.frozendict, | | -[one_of_5](#one_of_5) | list, tuple, | tuple, | | -[one_of_6](#one_of_6) | str, datetime, | str, | | value must conform to RFC-3339 date-time - -# one_of_2 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -# one_of_3 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD - -# one_of_4 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# one_of_5 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# one_of_6 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, datetime, | str, | | value must conform to RFC-3339 date-time - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ComposedString.md b/samples/openapi3/client/petstore/python/docs/models/ComposedString.md deleted file mode 100644 index 235511b37a2..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ComposedString.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.composed_string.ComposedString - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Currency.md b/samples/openapi3/client/petstore/python/docs/models/Currency.md deleted file mode 100644 index eeb1c6a47db..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Currency.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.currency.Currency - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["eur", "usd", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/DanishPig.md b/samples/openapi3/client/petstore/python/docs/models/DanishPig.md deleted file mode 100644 index 15917a42ef8..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/DanishPig.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.danish_pig.DanishPig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**className** | str, | str, | | must be one of ["DanishPig", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/DateTimeTest.md b/samples/openapi3/client/petstore/python/docs/models/DateTimeTest.md deleted file mode 100644 index ccfc8df5936..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/DateTimeTest.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.date_time_test.DateTimeTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, datetime, | str, | | if omitted the server will use the default value of 2010-01-01T10:10:10.000111+01:00value must conform to RFC-3339 date-time - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/DateTimeWithValidations.md b/samples/openapi3/client/petstore/python/docs/models/DateTimeWithValidations.md deleted file mode 100644 index ed7dfc06d13..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/DateTimeWithValidations.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.date_time_with_validations.DateTimeWithValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, datetime, | str, | | value must conform to RFC-3339 date-time - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/DateWithValidations.md b/samples/openapi3/client/petstore/python/docs/models/DateWithValidations.md deleted file mode 100644 index 97901a33f55..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/DateWithValidations.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.date_with_validations.DateWithValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/DecimalPayload.md b/samples/openapi3/client/petstore/python/docs/models/DecimalPayload.md deleted file mode 100644 index 26ef601ff9f..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/DecimalPayload.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.decimal_payload.DecimalPayload - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | value must be numeric and storable in decimal.Decimal - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Dog.md b/samples/openapi3/client/petstore/python/docs/models/Dog.md deleted file mode 100644 index 08201e4423b..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Dog.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.dog.Dog - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Animal](Animal.md) | [**Animal**](Animal.md) | [**Animal**](Animal.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**breed** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Drawing.md b/samples/openapi3/client/petstore/python/docs/models/Drawing.md deleted file mode 100644 index dce65cbb0b5..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Drawing.md +++ /dev/null @@ -1,30 +0,0 @@ -# petstore_api.model.drawing.Drawing - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**mainShape** | [**Shape**](Shape.md) | [**Shape**](Shape.md) | | [optional] -**shapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | [**ShapeOrNull**](ShapeOrNull.md) | | [optional] -**nullableShape** | [**NullableShape**](NullableShape.md) | [**NullableShape**](NullableShape.md) | | [optional] -**[shapes](#shapes)** | list, tuple, | tuple, | | [optional] -**any_string_name** | [**Fruit**](Fruit.md) | [**Fruit**](Fruit.md) | any string name can be used but the value must be the correct type | [optional] - -# shapes - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Shape**](Shape.md) | [**Shape**](Shape.md) | [**Shape**](Shape.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/EnumArrays.md b/samples/openapi3/client/petstore/python/docs/models/EnumArrays.md deleted file mode 100644 index cfff6ea29bd..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/EnumArrays.md +++ /dev/null @@ -1,28 +0,0 @@ -# petstore_api.model.enum_arrays.EnumArrays - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**just_symbol** | str, | str, | | [optional] must be one of [">=", "$", ] -**[array_enum](#array_enum)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# array_enum - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | must be one of ["fish", "crab", ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/EnumClass.md b/samples/openapi3/client/petstore/python/docs/models/EnumClass.md deleted file mode 100644 index 9e08aab1455..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/EnumClass.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.enum_class.EnumClass - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["_abc", "-efg", "(xyz)", "COUNT_1M", "COUNT_50M", ] if omitted the server will use the default value of "-efg" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/EnumTest.md b/samples/openapi3/client/petstore/python/docs/models/EnumTest.md deleted file mode 100644 index 02c3b08a201..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/EnumTest.md +++ /dev/null @@ -1,23 +0,0 @@ -# petstore_api.model.enum_test.EnumTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**enum_string_required** | str, | str, | | must be one of ["UPPER", "lower", "", ] -**enum_string** | str, | str, | | [optional] must be one of ["UPPER", "lower", "", ] -**enum_integer** | decimal.Decimal, int, | decimal.Decimal, | | [optional] must be one of [1, -1, ] value must be a 32 bit integer -**enum_number** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] must be one of [1.1, -1.2, ] value must be a 64 bit float -**stringEnum** | [**StringEnum**](StringEnum.md) | [**StringEnum**](StringEnum.md) | | [optional] -**IntegerEnum** | [**IntegerEnum**](IntegerEnum.md) | [**IntegerEnum**](IntegerEnum.md) | | [optional] -**StringEnumWithDefaultValue** | [**StringEnumWithDefaultValue**](StringEnumWithDefaultValue.md) | [**StringEnumWithDefaultValue**](StringEnumWithDefaultValue.md) | | [optional] -**IntegerEnumWithDefaultValue** | [**IntegerEnumWithDefaultValue**](IntegerEnumWithDefaultValue.md) | [**IntegerEnumWithDefaultValue**](IntegerEnumWithDefaultValue.md) | | [optional] -**IntegerEnumOneValue** | [**IntegerEnumOneValue**](IntegerEnumOneValue.md) | [**IntegerEnumOneValue**](IntegerEnumOneValue.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/EquilateralTriangle.md b/samples/openapi3/client/petstore/python/docs/models/EquilateralTriangle.md deleted file mode 100644 index 96971a1c0c6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/EquilateralTriangle.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.equilateral_triangle.EquilateralTriangle - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[TriangleInterface](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**triangleType** | str, | str, | | [optional] must be one of ["EquilateralTriangle", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/File.md b/samples/openapi3/client/petstore/python/docs/models/File.md deleted file mode 100644 index d85669c84f5..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/File.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.file.File - -Must be named `File` for test. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Must be named `File` for test. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**sourceURI** | str, | str, | Test capitalization | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python/docs/models/FileSchemaTestClass.md deleted file mode 100644 index 35dcfdca4ec..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/FileSchemaTestClass.md +++ /dev/null @@ -1,28 +0,0 @@ -# petstore_api.model.file_schema_test_class.FileSchemaTestClass - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | [**File**](File.md) | [**File**](File.md) | | [optional] -**[files](#files)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# files - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**File**](File.md) | [**File**](File.md) | [**File**](File.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Foo.md b/samples/openapi3/client/petstore/python/docs/models/Foo.md deleted file mode 100644 index 5ea8d33d369..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Foo.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.foo.Foo - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | str, | str, | | [optional] if omitted the server will use the default value of "bar" -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/FormatTest.md b/samples/openapi3/client/petstore/python/docs/models/FormatTest.md deleted file mode 100644 index 55ca4583a1b..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/FormatTest.md +++ /dev/null @@ -1,47 +0,0 @@ -# petstore_api.model.format_test.FormatTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**date** | str, date, | str, | | value must conform to RFC-3339 full-date YYYY-MM-DD -**number** | decimal.Decimal, int, float, | decimal.Decimal, | | -**password** | str, | str, | | -**byte** | str, | str, | | -**integer** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**int32** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**int32withValidations** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**int64** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**float** | decimal.Decimal, int, float, | decimal.Decimal, | this is a reserved python keyword | [optional] value must be a 32 bit float -**float32** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] value must be a 32 bit float -**double** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] value must be a 64 bit float -**float64** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] value must be a 64 bit float -**[arrayWithUniqueItems](#arrayWithUniqueItems)** | list, tuple, | tuple, | | [optional] -**string** | str, | str, | | [optional] -**binary** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | [optional] -**dateTime** | str, datetime, | str, | | [optional] value must conform to RFC-3339 date-time -**uuid** | str, uuid.UUID, | str, | | [optional] value must be a uuid -**uuidNoExample** | str, uuid.UUID, | str, | | [optional] value must be a uuid -**pattern_with_digits** | str, | str, | A string that is a 10 digit number. Can have leading zeros. | [optional] -**pattern_with_digits_and_delimiter** | str, | str, | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] -**noneProp** | None, | NoneClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# arrayWithUniqueItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/FromSchema.md b/samples/openapi3/client/petstore/python/docs/models/FromSchema.md deleted file mode 100644 index c11c63adb63..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/FromSchema.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.from_schema.FromSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**data** | str, | str, | | [optional] -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Fruit.md b/samples/openapi3/client/petstore/python/docs/models/Fruit.md deleted file mode 100644 index 44d670623fe..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Fruit.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.fruit.Fruit - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**color** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Apple](Apple.md) | [**Apple**](Apple.md) | [**Apple**](Apple.md) | | -[Banana](Banana.md) | [**Banana**](Banana.md) | [**Banana**](Banana.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/FruitReq.md b/samples/openapi3/client/petstore/python/docs/models/FruitReq.md deleted file mode 100644 index c4c18e3e4c9..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/FruitReq.md +++ /dev/null @@ -1,24 +0,0 @@ -# petstore_api.model.fruit_req.FruitReq - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | None, | NoneClass, | | -[AppleReq](AppleReq.md) | [**AppleReq**](AppleReq.md) | [**AppleReq**](AppleReq.md) | | -[BananaReq](BananaReq.md) | [**BananaReq**](BananaReq.md) | [**BananaReq**](BananaReq.md) | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/GmFruit.md b/samples/openapi3/client/petstore/python/docs/models/GmFruit.md deleted file mode 100644 index 6515df977c9..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/GmFruit.md +++ /dev/null @@ -1,22 +0,0 @@ -# petstore_api.model.gm_fruit.GmFruit - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**color** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### anyOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Apple](Apple.md) | [**Apple**](Apple.md) | [**Apple**](Apple.md) | | -[Banana](Banana.md) | [**Banana**](Banana.md) | [**Banana**](Banana.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/GrandparentAnimal.md b/samples/openapi3/client/petstore/python/docs/models/GrandparentAnimal.md deleted file mode 100644 index 813fe61b95a..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/GrandparentAnimal.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.grandparent_animal.GrandparentAnimal - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**pet_type** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python/docs/models/HasOnlyReadOnly.md deleted file mode 100644 index d9de17196fa..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/HasOnlyReadOnly.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.has_only_read_only.HasOnlyReadOnly - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | str, | str, | | [optional] -**foo** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/HealthCheckResult.md b/samples/openapi3/client/petstore/python/docs/models/HealthCheckResult.md deleted file mode 100644 index 0985cffd05e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/HealthCheckResult.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.health_check_result.HealthCheckResult - -Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**NullableMessage** | None, str, | NoneClass, str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerEnum.md b/samples/openapi3/client/petstore/python/docs/models/IntegerEnum.md deleted file mode 100644 index 59dd6239f78..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_enum.IntegerEnum - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | must be one of [0, 1, 2, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumBig.md b/samples/openapi3/client/petstore/python/docs/models/IntegerEnumBig.md deleted file mode 100644 index d4891543c05..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumBig.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_enum_big.IntegerEnumBig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | must be one of [10, 11, 12, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumOneValue.md b/samples/openapi3/client/petstore/python/docs/models/IntegerEnumOneValue.md deleted file mode 100644 index c2dd787bc57..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumOneValue.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_enum_one_value.IntegerEnumOneValue - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | must be one of [0, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/models/IntegerEnumWithDefaultValue.md deleted file mode 100644 index 4eef737f884..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerEnumWithDefaultValue.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_enum_with_default_value.IntegerEnumWithDefaultValue - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | must be one of [0, 1, 2, ] if omitted the server will use the default value of 0 - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerMax10.md b/samples/openapi3/client/petstore/python/docs/models/IntegerMax10.md deleted file mode 100644 index 93f3c282521..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerMax10.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_max10.IntegerMax10 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IntegerMin15.md b/samples/openapi3/client/petstore/python/docs/models/IntegerMin15.md deleted file mode 100644 index 1a900cf7b43..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IntegerMin15.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.integer_min15.IntegerMin15 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/IsoscelesTriangle.md b/samples/openapi3/client/petstore/python/docs/models/IsoscelesTriangle.md deleted file mode 100644 index 3a05686f411..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/IsoscelesTriangle.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.isosceles_triangle.IsoscelesTriangle - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[TriangleInterface](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**triangleType** | str, | str, | | [optional] must be one of ["IsoscelesTriangle", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequest.md b/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequest.md deleted file mode 100644 index fbc12502927..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.json_patch_request.JSONPatchRequest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[JSONPatchRequestAddReplaceTest](JSONPatchRequestAddReplaceTest.md) | [**JSONPatchRequestAddReplaceTest**](JSONPatchRequestAddReplaceTest.md) | [**JSONPatchRequestAddReplaceTest**](JSONPatchRequestAddReplaceTest.md) | | -[JSONPatchRequestRemove](JSONPatchRequestRemove.md) | [**JSONPatchRequestRemove**](JSONPatchRequestRemove.md) | [**JSONPatchRequestRemove**](JSONPatchRequestRemove.md) | | -[JSONPatchRequestMoveCopy](JSONPatchRequestMoveCopy.md) | [**JSONPatchRequestMoveCopy**](JSONPatchRequestMoveCopy.md) | [**JSONPatchRequestMoveCopy**](JSONPatchRequestMoveCopy.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestAddReplaceTest.md b/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestAddReplaceTest.md deleted file mode 100644 index a95e8f95743..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestAddReplaceTest.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**op** | str, | str, | The operation to perform. | must be one of ["add", "replace", "test", ] -**path** | str, | str, | A JSON Pointer path. | -**value** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | The value to add, replace or test. | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestMoveCopy.md b/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestMoveCopy.md deleted file mode 100644 index 56c8fac4b77..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestMoveCopy.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.json_patch_request_move_copy.JSONPatchRequestMoveCopy - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**op** | str, | str, | The operation to perform. | must be one of ["move", "copy", ] -**path** | str, | str, | A JSON Pointer path. | -**from** | str, | str, | A JSON Pointer path. | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestRemove.md b/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestRemove.md deleted file mode 100644 index a57981c57c9..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/JSONPatchRequestRemove.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.json_patch_request_remove.JSONPatchRequestRemove - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**op** | str, | str, | The operation to perform. | must be one of ["remove", ] -**path** | str, | str, | A JSON Pointer path. | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Mammal.md b/samples/openapi3/client/petstore/python/docs/models/Mammal.md deleted file mode 100644 index 12ac20a8200..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Mammal.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.mammal.Mammal - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Whale](Whale.md) | [**Whale**](Whale.md) | [**Whale**](Whale.md) | | -[Zebra](Zebra.md) | [**Zebra**](Zebra.md) | [**Zebra**](Zebra.md) | | -[Pig](Pig.md) | [**Pig**](Pig.md) | [**Pig**](Pig.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/MapTest.md b/samples/openapi3/client/petstore/python/docs/models/MapTest.md deleted file mode 100644 index 68c8d882955..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/MapTest.md +++ /dev/null @@ -1,66 +0,0 @@ -# petstore_api.model.map_test.MapTest - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[map_map_of_string](#map_map_of_string)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[map_of_enum_string](#map_of_enum_string)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[direct_map](#direct_map)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | [**StringBooleanMap**](StringBooleanMap.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# map_map_of_string - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, | frozendict.frozendict, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] - -# map_of_enum_string - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | str, | str, | any string name can be used but the value must be the correct type | [optional] must be one of ["UPPER", "lower", ] - -# direct_map - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | bool, | BoolClass, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index f85a43f4c7d..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.mixed_properties_and_additional_properties_class.MixedPropertiesAndAdditionalPropertiesClass - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**uuid** | str, uuid.UUID, | str, | | [optional] value must be a uuid -**dateTime** | str, datetime, | str, | | [optional] value must conform to RFC-3339 date-time -**[map](#map)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# map - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | [**Animal**](Animal.md) | [**Animal**](Animal.md) | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Model200Response.md b/samples/openapi3/client/petstore/python/docs/models/Model200Response.md deleted file mode 100644 index 90e17dd402b..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Model200Response.md +++ /dev/null @@ -1,18 +0,0 @@ -# petstore_api.model.model200_response.Model200Response - -model with an invalid class name for python, starts with a number - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | model with an invalid class name for python, starts with a number | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**class** | str, | str, | this is a reserved python keyword | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ModelReturn.md b/samples/openapi3/client/petstore/python/docs/models/ModelReturn.md deleted file mode 100644 index d896e1fbacb..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ModelReturn.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.model_return.ModelReturn - -Model for testing reserved words - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | Model for testing reserved words | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**return** | decimal.Decimal, int, | decimal.Decimal, | this is a reserved python keyword | [optional] value must be a 32 bit integer -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Money.md b/samples/openapi3/client/petstore/python/docs/models/Money.md deleted file mode 100644 index f6e182a846d..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Money.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.money.Money - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**amount** | str, | str, | | value must be numeric and storable in decimal.Decimal -**currency** | [**Currency**](Currency.md) | [**Currency**](Currency.md) | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Name.md b/samples/openapi3/client/petstore/python/docs/models/Name.md deleted file mode 100644 index 9e53cbabab1..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Name.md +++ /dev/null @@ -1,19 +0,0 @@ -# petstore_api.model.name.Name - -Model for testing model name same as property name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | Model for testing model name same as property name | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | decimal.Decimal, int, | decimal.Decimal, | | value must be a 32 bit integer -**snake_case** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**property** | str, | str, | this is a reserved python keyword | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NoAdditionalProperties.md b/samples/openapi3/client/petstore/python/docs/models/NoAdditionalProperties.md deleted file mode 100644 index 70e6c8c1205..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NoAdditionalProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.no_additional_properties.NoAdditionalProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer -**petId** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NullableClass.md b/samples/openapi3/client/petstore/python/docs/models/NullableClass.md deleted file mode 100644 index d9ad1059145..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NullableClass.md +++ /dev/null @@ -1,147 +0,0 @@ -# petstore_api.model.nullable_class.NullableClass - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**integer_prop** | None, decimal.Decimal, int, | NoneClass, decimal.Decimal, | | [optional] -**number_prop** | None, decimal.Decimal, int, float, | NoneClass, decimal.Decimal, | | [optional] -**boolean_prop** | None, bool, | NoneClass, BoolClass, | | [optional] -**string_prop** | None, str, | NoneClass, str, | | [optional] -**date_prop** | None, str, date, | NoneClass, str, | | [optional] value must conform to RFC-3339 full-date YYYY-MM-DD -**datetime_prop** | None, str, datetime, | NoneClass, str, | | [optional] value must conform to RFC-3339 date-time -**[array_nullable_prop](#array_nullable_prop)** | list, tuple, None, | tuple, NoneClass, | | [optional] -**[array_and_items_nullable_prop](#array_and_items_nullable_prop)** | list, tuple, None, | tuple, NoneClass, | | [optional] -**[array_items_nullable](#array_items_nullable)** | list, tuple, | tuple, | | [optional] -**[object_nullable_prop](#object_nullable_prop)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional] -**[object_and_items_nullable_prop](#object_and_items_nullable_prop)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | [optional] -**[object_items_nullable](#object_items_nullable)** | dict, frozendict.frozendict, | frozendict.frozendict, | | [optional] -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | any string name can be used but the value must be the correct type | [optional] - -# array_nullable_prop - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, None, | tuple, NoneClass, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# array_and_items_nullable_prop - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, None, | tuple, NoneClass, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# array_items_nullable - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# items - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# object_nullable_prop - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, | frozendict.frozendict, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -# object_and_items_nullable_prop - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# object_items_nullable - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[any_string_name](#any_string_name)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | any string name can be used but the value must be the correct type | [optional] - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -# any_string_name - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NullableShape.md b/samples/openapi3/client/petstore/python/docs/models/NullableShape.md deleted file mode 100644 index 9871dfe1e10..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NullableShape.md +++ /dev/null @@ -1,26 +0,0 @@ -# petstore_api.model.nullable_shape.NullableShape - -The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Triangle](Triangle.md) | [**Triangle**](Triangle.md) | [**Triangle**](Triangle.md) | | -[Quadrilateral](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | | -[one_of_2](#one_of_2) | None, | NoneClass, | | - -# one_of_2 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NullableString.md b/samples/openapi3/client/petstore/python/docs/models/NullableString.md deleted file mode 100644 index 60b4aba3168..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NullableString.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.nullable_string.NullableString - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, str, | NoneClass, str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Number.md b/samples/openapi3/client/petstore/python/docs/models/Number.md deleted file mode 100644 index b1172e284fc..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Number.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.number.Number - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NumberOnly.md b/samples/openapi3/client/petstore/python/docs/models/NumberOnly.md deleted file mode 100644 index 42996c4e4cd..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NumberOnly.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.number_only.NumberOnly - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**JustNumber** | decimal.Decimal, int, float, | decimal.Decimal, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/NumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/models/NumberWithValidations.md deleted file mode 100644 index fac4f59efe7..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/NumberWithValidations.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.number_with_validations.NumberWithValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, float, | decimal.Decimal, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectInterface.md b/samples/openapi3/client/petstore/python/docs/models/ObjectInterface.md deleted file mode 100644 index e818da00c6f..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectInterface.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.object_interface.ObjectInterface - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md deleted file mode 100644 index f7d2a859506..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithArgAndArgsProperties.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.object_model_with_arg_and_args_properties.ObjectModelWithArgAndArgsProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**args** | str, | str, | | -**arg** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md b/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md deleted file mode 100644 index 8bb001aa771..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectModelWithRefProps.md +++ /dev/null @@ -1,19 +0,0 @@ -# petstore_api.model.object_model_with_ref_props.ObjectModelWithRefProps - -a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**myNumber** | [**NumberWithValidations**](NumberWithValidations.md) | [**NumberWithValidations**](NumberWithValidations.md) | | [optional] -**myString** | str, | str, | | [optional] -**myBoolean** | bool, | BoolClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md deleted file mode 100644 index 6c4f1033e0e..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithAllOfWithReqTestPropFromUnsetAddProp.md +++ /dev/null @@ -1,30 +0,0 @@ -# petstore_api.model.object_with_all_of_with_req_test_prop_from_unset_add_prop.ObjectWithAllOfWithReqTestPropFromUnsetAddProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ObjectWithOptionalTestProp](ObjectWithOptionalTestProp.md) | [**ObjectWithOptionalTestProp**](ObjectWithOptionalTestProp.md) | [**ObjectWithOptionalTestProp**](ObjectWithOptionalTestProp.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**test** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | -**name** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md deleted file mode 100644 index 82c1abadd60..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithDecimalProperties.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.object_with_decimal_properties.ObjectWithDecimalProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**length** | str, | str, | | [optional] value must be numeric and storable in decimal.Decimal -**width** | str, | str, | | [optional] value must be numeric and storable in decimal.Decimal -**cost** | [**Money**](Money.md) | [**Money**](Money.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithDifficultlyNamedProps.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithDifficultlyNamedProps.md deleted file mode 100644 index 13ca7fa1458..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithDifficultlyNamedProps.md +++ /dev/null @@ -1,19 +0,0 @@ -# petstore_api.model.object_with_difficultly_named_props.ObjectWithDifficultlyNamedProps - -model with properties that have invalid names for python - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | model with properties that have invalid names for python | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**123-list** | str, | str, | | -**$special[property.name]** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**123Number** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithInlineCompositionProperty.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithInlineCompositionProperty.md deleted file mode 100644 index ddf1df42175..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithInlineCompositionProperty.md +++ /dev/null @@ -1,35 +0,0 @@ -# petstore_api.model.object_with_inline_composition_property.ObjectWithInlineCompositionProperty - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[someProp](#someProp)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# someProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[all_of_0](#all_of_0) | str, | str, | | - -# all_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md deleted file mode 100644 index d3762cc45cc..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithInvalidNamedRefedProperties.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.object_with_invalid_named_refed_properties.ObjectWithInvalidNamedRefedProperties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**!reference** | [**ArrayWithValidationsInItems**](ArrayWithValidationsInItems.md) | [**ArrayWithValidationsInItems**](ArrayWithValidationsInItems.md) | | -**from** | [**FromSchema**](FromSchema.md) | [**FromSchema**](FromSchema.md) | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithOptionalTestProp.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithOptionalTestProp.md deleted file mode 100644 index 2f437c22d07..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithOptionalTestProp.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.object_with_optional_test_prop.ObjectWithOptionalTestProp - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**test** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ObjectWithValidations.md b/samples/openapi3/client/petstore/python/docs/models/ObjectWithValidations.md deleted file mode 100644 index be9d36e49b6..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ObjectWithValidations.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.object_with_validations.ObjectWithValidations - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Order.md b/samples/openapi3/client/petstore/python/docs/models/Order.md deleted file mode 100644 index 0007dc9178d..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Order.md +++ /dev/null @@ -1,20 +0,0 @@ -# petstore_api.model.order.Order - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**petId** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**quantity** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 32 bit integer -**shipDate** | str, datetime, | str, | | [optional] value must conform to RFC-3339 date-time -**status** | str, | str, | Order Status | [optional] must be one of ["placed", "approved", "delivered", ] -**complete** | bool, | BoolClass, | | [optional] if omitted the server will use the default value of False -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ParentPet.md b/samples/openapi3/client/petstore/python/docs/models/ParentPet.md deleted file mode 100644 index 1baad19537f..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ParentPet.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.parent_pet.ParentPet - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[GrandparentAnimal](GrandparentAnimal.md) | [**GrandparentAnimal**](GrandparentAnimal.md) | [**GrandparentAnimal**](GrandparentAnimal.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Pet.md b/samples/openapi3/client/petstore/python/docs/models/Pet.md deleted file mode 100644 index eacf6aa431d..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Pet.md +++ /dev/null @@ -1,46 +0,0 @@ -# petstore_api.model.pet.Pet - -Pet object that needs to be added to the store - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Pet object that needs to be added to the store | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[photoUrls](#photoUrls)** | list, tuple, | tuple, | | -**name** | str, | str, | | -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**category** | [**Category**](Category.md) | [**Category**](Category.md) | | [optional] -**[tags](#tags)** | list, tuple, | tuple, | | [optional] -**status** | str, | str, | pet status in the store | [optional] must be one of ["available", "pending", "sold", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# photoUrls - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -items | str, | str, | | - -# tags - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**Tag**](Tag.md) | [**Tag**](Tag.md) | [**Tag**](Tag.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Pig.md b/samples/openapi3/client/petstore/python/docs/models/Pig.md deleted file mode 100644 index 33a8aca85ea..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Pig.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.pig.Pig - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[BasquePig](BasquePig.md) | [**BasquePig**](BasquePig.md) | [**BasquePig**](BasquePig.md) | | -[DanishPig](DanishPig.md) | [**DanishPig**](DanishPig.md) | [**DanishPig**](DanishPig.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Player.md b/samples/openapi3/client/petstore/python/docs/models/Player.md deleted file mode 100644 index 98ec6b5d152..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Player.md +++ /dev/null @@ -1,18 +0,0 @@ -# petstore_api.model.player.Player - -a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**name** | str, | str, | | [optional] -**enemyPlayer** | [**Player**](Player.md) | [**Player**](Player.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Quadrilateral.md b/samples/openapi3/client/petstore/python/docs/models/Quadrilateral.md deleted file mode 100644 index 55f18627244..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Quadrilateral.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.quadrilateral.Quadrilateral - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[SimpleQuadrilateral](SimpleQuadrilateral.md) | [**SimpleQuadrilateral**](SimpleQuadrilateral.md) | [**SimpleQuadrilateral**](SimpleQuadrilateral.md) | | -[ComplexQuadrilateral](ComplexQuadrilateral.md) | [**ComplexQuadrilateral**](ComplexQuadrilateral.md) | [**ComplexQuadrilateral**](ComplexQuadrilateral.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/QuadrilateralInterface.md b/samples/openapi3/client/petstore/python/docs/models/QuadrilateralInterface.md deleted file mode 100644 index 8344d0ffbaf..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/QuadrilateralInterface.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.quadrilateral_interface.QuadrilateralInterface - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**shapeType** | str, | str, | | must be one of ["Quadrilateral", ] -**quadrilateralType** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python/docs/models/ReadOnlyFirst.md deleted file mode 100644 index a8f4053a418..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ReadOnlyFirst.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.read_only_first.ReadOnlyFirst - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**bar** | str, | str, | | [optional] -**baz** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ScaleneTriangle.md b/samples/openapi3/client/petstore/python/docs/models/ScaleneTriangle.md deleted file mode 100644 index dde662e47e2..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ScaleneTriangle.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.scalene_triangle.ScaleneTriangle - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[TriangleInterface](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | [**TriangleInterface**](TriangleInterface.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**triangleType** | str, | str, | | [optional] must be one of ["ScaleneTriangle", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Shape.md b/samples/openapi3/client/petstore/python/docs/models/Shape.md deleted file mode 100644 index f8bec209ec2..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Shape.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.shape.Shape - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[Triangle](Triangle.md) | [**Triangle**](Triangle.md) | [**Triangle**](Triangle.md) | | -[Quadrilateral](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/ShapeOrNull.md b/samples/openapi3/client/petstore/python/docs/models/ShapeOrNull.md deleted file mode 100644 index 908b69e0587..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/ShapeOrNull.md +++ /dev/null @@ -1,26 +0,0 @@ -# petstore_api.model.shape_or_null.ShapeOrNull - -The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[one_of_0](#one_of_0) | None, | NoneClass, | | -[Triangle](Triangle.md) | [**Triangle**](Triangle.md) | [**Triangle**](Triangle.md) | | -[Quadrilateral](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | [**Quadrilateral**](Quadrilateral.md) | | - -# one_of_0 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/SimpleQuadrilateral.md b/samples/openapi3/client/petstore/python/docs/models/SimpleQuadrilateral.md deleted file mode 100644 index 288684f5dcc..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/SimpleQuadrilateral.md +++ /dev/null @@ -1,29 +0,0 @@ -# petstore_api.model.simple_quadrilateral.SimpleQuadrilateral - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[QuadrilateralInterface](QuadrilateralInterface.md) | [**QuadrilateralInterface**](QuadrilateralInterface.md) | [**QuadrilateralInterface**](QuadrilateralInterface.md) | | -[all_of_1](#all_of_1) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# all_of_1 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**quadrilateralType** | str, | str, | | [optional] must be one of ["SimpleQuadrilateral", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/SomeObject.md b/samples/openapi3/client/petstore/python/docs/models/SomeObject.md deleted file mode 100644 index 7599329a36d..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/SomeObject.md +++ /dev/null @@ -1,15 +0,0 @@ -# petstore_api.model.some_object.SomeObject - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### allOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[ObjectInterface](ObjectInterface.md) | [**ObjectInterface**](ObjectInterface.md) | [**ObjectInterface**](ObjectInterface.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/SpecialModelName.md b/samples/openapi3/client/petstore/python/docs/models/SpecialModelName.md deleted file mode 100644 index f40d98660aa..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/SpecialModelName.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.special_model_name.SpecialModelName - -model with an invalid class name for python - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | model with an invalid class name for python | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**a** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/String.md b/samples/openapi3/client/petstore/python/docs/models/String.md deleted file mode 100644 index 75fc685c2ca..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/String.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.string.String - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/StringBooleanMap.md b/samples/openapi3/client/petstore/python/docs/models/StringBooleanMap.md deleted file mode 100644 index 48f1fe881e2..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/StringBooleanMap.md +++ /dev/null @@ -1,14 +0,0 @@ -# petstore_api.model.string_boolean_map.StringBooleanMap - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**any_string_name** | bool, | BoolClass, | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/StringEnum.md b/samples/openapi3/client/petstore/python/docs/models/StringEnum.md deleted file mode 100644 index 06c26a7a1ac..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/StringEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.string_enum.StringEnum - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, str, | NoneClass, str, | | must be one of ["placed", "approved", "delivered", "single quoted", "multiple\nlines", "double quote \n with newline", None, ] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/StringEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/models/StringEnumWithDefaultValue.md deleted file mode 100644 index 028f1b3733c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/StringEnumWithDefaultValue.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.string_enum_with_default_value.StringEnumWithDefaultValue - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | must be one of ["placed", "approved", "delivered", ] if omitted the server will use the default value of "placed" - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/StringWithValidation.md b/samples/openapi3/client/petstore/python/docs/models/StringWithValidation.md deleted file mode 100644 index 3effe032b8c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/StringWithValidation.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.string_with_validation.StringWithValidation - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Tag.md b/samples/openapi3/client/petstore/python/docs/models/Tag.md deleted file mode 100644 index 7e61a1fffa9..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Tag.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.tag.Tag - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**name** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Triangle.md b/samples/openapi3/client/petstore/python/docs/models/Triangle.md deleted file mode 100644 index c89258b99fe..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Triangle.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.triangle.Triangle - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### oneOf -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[EquilateralTriangle](EquilateralTriangle.md) | [**EquilateralTriangle**](EquilateralTriangle.md) | [**EquilateralTriangle**](EquilateralTriangle.md) | | -[IsoscelesTriangle](IsoscelesTriangle.md) | [**IsoscelesTriangle**](IsoscelesTriangle.md) | [**IsoscelesTriangle**](IsoscelesTriangle.md) | | -[ScaleneTriangle](ScaleneTriangle.md) | [**ScaleneTriangle**](ScaleneTriangle.md) | [**ScaleneTriangle**](ScaleneTriangle.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/TriangleInterface.md b/samples/openapi3/client/petstore/python/docs/models/TriangleInterface.md deleted file mode 100644 index 259594c7880..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/TriangleInterface.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.triangle_interface.TriangleInterface - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**shapeType** | str, | str, | | must be one of ["Triangle", ] -**triangleType** | str, | str, | | -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/UUIDString.md b/samples/openapi3/client/petstore/python/docs/models/UUIDString.md deleted file mode 100644 index 020676d5843..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/UUIDString.md +++ /dev/null @@ -1,9 +0,0 @@ -# petstore_api.model.uuid_string.UUIDString - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, uuid.UUID, | str, | | value must be a uuid - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/User.md b/samples/openapi3/client/petstore/python/docs/models/User.md deleted file mode 100644 index 11da137c640..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/User.md +++ /dev/null @@ -1,67 +0,0 @@ -# petstore_api.model.user.User - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**username** | str, | str, | | [optional] -**firstName** | str, | str, | | [optional] -**lastName** | str, | str, | | [optional] -**email** | str, | str, | | [optional] -**password** | str, | str, | | [optional] -**phone** | str, | str, | | [optional] -**userStatus** | decimal.Decimal, int, | decimal.Decimal, | User Status | [optional] value must be a 32 bit integer -**[objectWithNoDeclaredProps](#objectWithNoDeclaredProps)** | dict, frozendict.frozendict, | frozendict.frozendict, | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional] -**[objectWithNoDeclaredPropsNullable](#objectWithNoDeclaredPropsNullable)** | dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional] -**anyTypeProp** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional] -**[anyTypeExceptNullProp](#anyTypeExceptNullProp)** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | [optional] -**anyTypePropNullable** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# objectWithNoDeclaredProps - -test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | - -# objectWithNoDeclaredPropsNullable - -test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, None, | frozendict.frozendict, NoneClass, | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | - -# anyTypeExceptNullProp - -any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any type except 'null' Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. | - -### Composed Schemas (allOf/anyOf/oneOf/not) -#### not -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[not_schema](#not_schema) | None, | NoneClass, | | - -# not_schema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -None, | NoneClass, | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Whale.md b/samples/openapi3/client/petstore/python/docs/models/Whale.md deleted file mode 100644 index bd92a1048d4..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Whale.md +++ /dev/null @@ -1,17 +0,0 @@ -# petstore_api.model.whale.Whale - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**className** | str, | str, | | must be one of ["whale", ] -**hasBaleen** | bool, | BoolClass, | | [optional] -**hasTeeth** | bool, | BoolClass, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/docs/models/Zebra.md b/samples/openapi3/client/petstore/python/docs/models/Zebra.md deleted file mode 100644 index c710364ef8c..00000000000 --- a/samples/openapi3/client/petstore/python/docs/models/Zebra.md +++ /dev/null @@ -1,16 +0,0 @@ -# petstore_api.model.zebra.Zebra - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**className** | str, | str, | | must be one of ["zebra", ] -**type** | str, | str, | | [optional] must be one of ["plains", "mountain", "grevys", ] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) - diff --git a/samples/openapi3/client/petstore/python/git_push.sh b/samples/openapi3/client/petstore/python/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/openapi3/client/petstore/python/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/openapi3/client/petstore/python/petstore_api/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/__init__.py deleted file mode 100644 index 26b0467759d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/__init__.py +++ /dev/null @@ -1,31 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -__version__ = "1.0.0" - -# import ApiClient -from petstore_api.api_client import ApiClient - -# import Configuration -from petstore_api.configuration import Configuration -from petstore_api.signing import HttpSigningConfiguration - -# import exceptions -from petstore_api.exceptions import OpenApiException -from petstore_api.exceptions import ApiAttributeError -from petstore_api.exceptions import ApiTypeError -from petstore_api.exceptions import ApiValueError -from petstore_api.exceptions import ApiKeyError -from petstore_api.exceptions import ApiException - -__import__('sys').setrecursionlimit(1234) diff --git a/samples/openapi3/client/petstore/python/petstore_api/api_client.py b/samples/openapi3/client/petstore/python/petstore_api/api_client.py deleted file mode 100644 index 01a0cb7934a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/api_client.py +++ /dev/null @@ -1,1508 +0,0 @@ -# coding: utf-8 -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -from decimal import Decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing.pool import ThreadPool -import re -import tempfile -import typing -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict -from urllib.parse import urlparse, quote -from urllib3.fields import RequestField as RequestFieldBase - -import frozendict - -from petstore_api import rest -from petstore_api.configuration import Configuration -from petstore_api.exceptions import ApiTypeError, ApiValueError -from petstore_api.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, - date, - datetime, - none_type, - Unset, - unset, -) - - -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - def default(self, obj): - if isinstance(obj, str): - return str(obj) - elif isinstance(obj, float): - return float(obj) - elif isinstance(obj, int): - return int(obj) - elif isinstance(obj, Decimal): - if obj.as_tuple().exponent >= 0: - return int(obj) - return float(obj) - elif isinstance(obj, NoneClass): - return None - elif isinstance(obj, BoolClass): - return bool(obj) - elif isinstance(obj, (dict, frozendict.frozendict)): - return {key: self.default(val) for key, val in obj.items()} - elif isinstance(obj, (list, tuple)): - return [self.default(item) for item in obj] - raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__)) - - -class ParameterInType(enum.Enum): - QUERY = 'query' - HEADER = 'header' - PATH = 'path' - COOKIE = 'cookie' - - -class ParameterStyle(enum.Enum): - MATRIX = 'matrix' - LABEL = 'label' - FORM = 'form' - SIMPLE = 'simple' - SPACE_DELIMITED = 'spaceDelimited' - PIPE_DELIMITED = 'pipeDelimited' - DEEP_OBJECT = 'deepObject' - - -class PrefixSeparatorIterator: - # A class to store prefixes and separators for rfc6570 expansions - - def __init__(self, prefix: str, separator: str): - self.prefix = prefix - self.separator = separator - self.first = True - if separator in {'.', '|', '%20'}: - item_separator = separator - else: - item_separator = ',' - self.item_separator = item_separator - - def __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @staticmethod - def __ref6570_item_value(in_data: typing.Any, percent_encode: bool): - """ - Get representation if str/float/int/None/items in list/ values in dict - None is returned if an item is undefined, use cases are value= - - None - - [] - - {} - - [None, None None] - - {'a': None, 'b': None} - """ - if type(in_data) in {str, float, int}: - if percent_encode: - return quote(str(in_data)) - return str(in_data) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, list) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - elif isinstance(in_data, dict) and not in_data: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return None - raise ApiValueError('Unable to generate a ref6570 item representation of {}'.format(in_data)) - - @staticmethod - def _to_dict(name: str, value: str): - return {name: value} - - @classmethod - def __ref6570_str_float_int_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_value = cls.__ref6570_item_value(in_data, percent_encode) - if item_value is None or (item_value == '' and prefix_separator_iterator.separator == ';'): - return next(prefix_separator_iterator) + var_name_piece - value_pair_equals = '=' if named_parameter_expansion else '' - return next(prefix_separator_iterator) + var_name_piece + value_pair_equals + item_value - - @classmethod - def __ref6570_list_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - item_values = [cls.__ref6570_item_value(v, percent_encode) for v in in_data] - item_values = [v for v in item_values if v is not None] - if not item_values: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + - value_pair_equals + - prefix_separator_iterator.item_separator.join(item_values) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [var_name_piece + value_pair_equals + val for val in item_values] - ) - - @classmethod - def __ref6570_dict_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator, - var_name_piece: str, - named_parameter_expansion: bool - ) -> str: - in_data_transformed = {key: cls.__ref6570_item_value(val, percent_encode) for key, val in in_data.items()} - in_data_transformed = {key: val for key, val in in_data_transformed.items() if val is not None} - if not in_data_transformed: - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - value_pair_equals = '=' if named_parameter_expansion else '' - if not explode: - return ( - next(prefix_separator_iterator) + - var_name_piece + value_pair_equals + - prefix_separator_iterator.item_separator.join( - prefix_separator_iterator.item_separator.join( - item_pair - ) for item_pair in in_data_transformed.items() - ) - ) - # exploded - return next(prefix_separator_iterator) + next(prefix_separator_iterator).join( - [key + '=' + val for key, val in in_data_transformed.items()] - ) - - @classmethod - def _ref6570_expansion( - cls, - variable_name: str, - in_data: typing.Any, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: PrefixSeparatorIterator - ) -> str: - """ - Separator is for separate variables like dict with explode true, not for array item separation - """ - named_parameter_expansion = prefix_separator_iterator.separator in {'&', ';'} - var_name_piece = variable_name if named_parameter_expansion else '' - if type(in_data) in {str, float, int}: - return cls.__ref6570_str_float_int_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, none_type): - # ignored by the expansion process https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.1 - return "" - elif isinstance(in_data, list): - return cls.__ref6570_list_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - elif isinstance(in_data, dict): - return cls.__ref6570_dict_expansion( - variable_name, - in_data, - explode, - percent_encode, - prefix_separator_iterator, - var_name_piece, - named_parameter_expansion - ) - # bool, bytes, etc - raise ApiValueError('Unable to generate a ref6570 representation of {}'.format(in_data)) - - -class StyleFormSerializer(ParameterSerializerBase): - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - if style is ParameterStyle.FORM: - return True - return super()._get_default_explode(style) - - def _serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool, - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> str: - if prefix_separator_iterator is None: - prefix_separator_iterator = PrefixSeparatorIterator('', '&') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - name: str, - explode: bool, - percent_encode: bool - ) -> str: - prefix_separator_iterator = PrefixSeparatorIterator('', ',') - return self._ref6570_expansion( - variable_name=name, - in_data=in_data, - explode=explode, - percent_encode=percent_encode, - prefix_separator_iterator=prefix_separator_iterator - ) - - -class JSONDetector: - """ - Works for: - application/json - application/json; charset=UTF-8 - application/json-patch+json - application/geo+json - """ - __json_content_type_pattern = re.compile("application/[^+]*[+]?(json);?.*") - - @classmethod - def _content_type_is_json(cls, content_type: str) -> bool: - if cls.__json_content_type_pattern.match(content_type): - return True - return False - - -@dataclass -class ParameterBase(JSONDetector): - name: str - in_type: ParameterInType - required: bool - style: typing.Optional[ParameterStyle] - explode: typing.Optional[bool] - allow_reserved: typing.Optional[bool] - schema: typing.Optional[typing.Type[Schema]] - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] - - __style_to_in_type = { - ParameterStyle.MATRIX: {ParameterInType.PATH}, - ParameterStyle.LABEL: {ParameterInType.PATH}, - ParameterStyle.FORM: {ParameterInType.QUERY, ParameterInType.COOKIE}, - ParameterStyle.SIMPLE: {ParameterInType.PATH, ParameterInType.HEADER}, - ParameterStyle.SPACE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.PIPE_DELIMITED: {ParameterInType.QUERY}, - ParameterStyle.DEEP_OBJECT: {ParameterInType.QUERY}, - } - __in_type_to_default_style = { - ParameterInType.QUERY: ParameterStyle.FORM, - ParameterInType.PATH: ParameterStyle.SIMPLE, - ParameterInType.HEADER: ParameterStyle.SIMPLE, - ParameterInType.COOKIE: ParameterStyle.FORM, - } - __disallowed_header_names = {'Accept', 'Content-Type', 'Authorization'} - _json_encoder = JSONEncoder() - - @classmethod - def __verify_style_to_in_type(cls, style: typing.Optional[ParameterStyle], in_type: ParameterInType): - if style is None: - return - in_type_set = cls.__style_to_in_type[style] - if in_type not in in_type_set: - raise ValueError( - 'Invalid style and in_type combination. For style={} only in_type={} are allowed'.format( - style, in_type_set - ) - ) - - def __init__( - self, - name: str, - in_type: ParameterInType, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - if schema is None and content is None: - raise ValueError('Value missing; Pass in either schema or content') - if schema and content: - raise ValueError('Too many values provided. Both schema and content were provided. Only one may be input') - if name in self.__disallowed_header_names and in_type is ParameterInType.HEADER: - raise ValueError('Invalid name, name may not be one of {}'.format(self.__disallowed_header_names)) - self.__verify_style_to_in_type(style, in_type) - if content is None and style is None: - style = self.__in_type_to_default_style[in_type] - if content is not None and in_type in self.__in_type_to_default_style and len(content) != 1: - raise ValueError('Invalid content length, content length must equal 1') - self.in_type = in_type - self.name = name - self.required = required - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - self.schema = schema - self.content = content - - def _serialize_json( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - eliminate_whitespace: bool = False - ) -> str: - if eliminate_whitespace: - return json.dumps(in_data, separators=self._json_encoder.compact_separators) - return json.dumps(in_data) - - -class PathParameter(ParameterBase, StyleSimpleSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.PATH, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_label( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator('.', '.') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_matrix( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list] - ) -> typing.Dict[str, str]: - prefix_separator_iterator = PrefixSeparatorIterator(';', ';') - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_simple( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - ) -> typing.Dict[str, str]: - value = self._serialize_simple( - in_data=in_data, - name=self.name, - explode=self.explode, - percent_encode=True - ) - return self._to_dict(self.name, value) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> path - path: - returns path_params: dict - label -> path - returns path_params - matrix -> path - returns path_params - """ - if self.style: - if self.style is ParameterStyle.SIMPLE: - return self.__serialize_simple(cast_in_data) - elif self.style is ParameterStyle.LABEL: - return self.__serialize_label(cast_in_data) - elif self.style is ParameterStyle.MATRIX: - return self.__serialize_matrix(cast_in_data) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class QueryParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.QUERY, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def __serialize_space_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_pipe_delimited( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._ref6570_expansion( - variable_name=self.name, - in_data=in_data, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def __serialize_form( - self, - in_data: typing.Union[None, int, float, str, bool, dict, list], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] - ) -> typing.Dict[str, str]: - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - value = self._serialize_form( - in_data, - name=self.name, - explode=self.explode, - percent_encode=True, - prefix_separator_iterator=prefix_separator_iterator - ) - return self._to_dict(self.name, value) - - def get_prefix_separator_iterator(self) -> typing.Optional[PrefixSeparatorIterator]: - if self.style is ParameterStyle.FORM: - return PrefixSeparatorIterator('?', '&') - elif self.style is ParameterStyle.SPACE_DELIMITED: - return PrefixSeparatorIterator('', '%20') - elif self.style is ParameterStyle.PIPE_DELIMITED: - return PrefixSeparatorIterator('', '|') - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict], - prefix_separator_iterator: typing.Optional[PrefixSeparatorIterator] = None - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> query - query: - - GET/HEAD/DELETE: could use fields - - PUT/POST: must use urlencode to send parameters - returns fields: tuple - spaceDelimited -> query - returns fields - pipeDelimited -> query - returns fields - deepObject -> query, https://github.com/OAI/OpenAPI-Specification/issues/1706 - returns fields - """ - if self.style: - # TODO update query ones to omit setting values when [] {} or None is input - if self.style is ParameterStyle.FORM: - return self.__serialize_form(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.SPACE_DELIMITED: - return self.__serialize_space_delimited(cast_in_data, prefix_separator_iterator) - elif self.style is ParameterStyle.PIPE_DELIMITED: - return self.__serialize_pipe_delimited(cast_in_data, prefix_separator_iterator) - # self.content will be length one - if prefix_separator_iterator is None: - prefix_separator_iterator = self.get_prefix_separator_iterator() - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data, eliminate_whitespace=True) - return self._to_dict( - self.name, - next(prefix_separator_iterator) + self.name + '=' + quote(value) - ) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class CookieParameter(ParameterBase, StyleFormSerializer): - - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: typing.Optional[bool] = None, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - used_style = ParameterStyle.FORM if style is None and content is None and schema else style - used_explode = self._get_default_explode(used_style) if explode is None else explode - - super().__init__( - name, - in_type=ParameterInType.COOKIE, - required=required, - style=used_style, - explode=used_explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> typing.Dict[str, str]: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - form -> cookie - returns fields: tuple - """ - if self.style: - """ - TODO add escaping of comma, space, equals - or turn encoding on - """ - value = self._serialize_form( - cast_in_data, - explode=self.explode, - name=self.name, - percent_encode=False, - prefix_separator_iterator=PrefixSeparatorIterator('', '&') - ) - return self._to_dict(self.name, value) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self._to_dict(self.name, value) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class HeaderParameter(ParameterBase, StyleSimpleSerializer): - def __init__( - self, - name: str, - required: bool = False, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: typing.Optional[bool] = None, - schema: typing.Optional[typing.Type[Schema]] = None, - content: typing.Optional[typing.Dict[str, typing.Type[Schema]]] = None - ): - super().__init__( - name, - in_type=ParameterInType.HEADER, - required=required, - style=style, - explode=explode, - allow_reserved=allow_reserved, - schema=schema, - content=content - ) - - @staticmethod - def __to_headers(in_data: typing.Tuple[typing.Tuple[str, str], ...]) -> HTTPHeaderDict: - data = tuple(t for t in in_data if t) - headers = HTTPHeaderDict() - if not data: - return headers - headers.extend(data) - return headers - - def serialize( - self, - in_data: typing.Union[ - Schema, Decimal, int, float, str, date, datetime, None, bool, list, tuple, dict, frozendict.frozendict] - ) -> HTTPHeaderDict: - if self.schema: - cast_in_data = self.schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - """ - simple -> header - headers: PoolManager needs a mapping, tuple is close - returns headers: dict - """ - if self.style: - value = self._serialize_simple(cast_in_data, self.name, self.explode, False) - return self.__to_headers(((self.name, value),)) - # self.content will be length one - for content_type, schema in self.content.items(): - cast_in_data = schema(in_data) - cast_in_data = self._json_encoder.default(cast_in_data) - if self._content_type_is_json(content_type): - value = self._serialize_json(cast_in_data) - return self.__to_headers(((self.name, value),)) - raise NotImplementedError('Serialization of {} has not yet been implemented'.format(content_type)) - - -class Encoding: - def __init__( - self, - content_type: str, - headers: typing.Optional[typing.Dict[str, HeaderParameter]] = None, - style: typing.Optional[ParameterStyle] = None, - explode: bool = False, - allow_reserved: bool = False, - ): - self.content_type = content_type - self.headers = headers - self.style = style - self.explode = explode - self.allow_reserved = allow_reserved - - -@dataclass -class MediaType: - """ - Used to store request and response body schema information - encoding: - A map between a property name and its encoding information. - The key, being the property name, MUST exist in the schema as a property. - The encoding object SHALL only apply to requestBody objects when the media type is - multipart or application/x-www-form-urlencoded. - """ - schema: typing.Optional[typing.Type[Schema]] = None - encoding: typing.Optional[typing.Dict[str, Encoding]] = None - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - def __init__( - self, - response: urllib3.HTTPResponse, - body: typing.Union[Unset, Schema] = unset, - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - ): - """ - pycharm needs this to prevent 'Unexpected argument' warnings - """ - self.response = response - self.body = body - self.headers = headers - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - def __init__( - self, - response_cls: typing.Type[ApiResponse] = ApiResponse, - content: typing.Optional[typing.Dict[str, MediaType]] = None, - headers: typing.Optional[typing.List[HeaderParameter]] = None, - ): - self.headers = headers - if content is not None and len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - self.response_cls = response_cls - - @staticmethod - def __deserialize_json(response: urllib3.HTTPResponse) -> typing.Any: - # python must be >= 3.9 so we can pass in bytes into json.loads - return json.loads(response.data) - - @staticmethod - def __file_name_from_response_url(response_url: typing.Optional[str]) -> typing.Optional[str]: - if response_url is None: - return None - url_path = urlparse(response_url).path - if url_path: - path_basename = os.path.basename(url_path) - if path_basename: - _filename, ext = os.path.splitext(path_basename) - if ext: - return path_basename - return None - - @classmethod - def __file_name_from_content_disposition(cls, content_disposition: typing.Optional[str]) -> typing.Optional[str]: - if content_disposition is None: - return None - match = cls.__filename_content_disposition_pattern.search(content_disposition) - if not match: - return None - return match.group(1) - - def __deserialize_application_octet_stream( - self, response: urllib3.HTTPResponse - ) -> typing.Union[bytes, io.BufferedReader]: - """ - urllib3 use cases: - 1. when preload_content=True (stream=False) then supports_chunked_reads is False and bytes are returned - 2. when preload_content=False (stream=True) then supports_chunked_reads is True and - a file will be written and returned - """ - if response.supports_chunked_reads(): - file_name = ( - self.__file_name_from_content_disposition(response.headers.get('content-disposition')) - or self.__file_name_from_response_url(response.geturl()) - ) - - if file_name is None: - _fd, path = tempfile.mkstemp() - else: - path = os.path.join(tempfile.gettempdir(), file_name) - - with open(path, 'wb') as new_file: - chunk_size = 1024 - while True: - data = response.read(chunk_size) - if not data: - break - new_file.write(data) - # release_conn is needed for streaming connections only - response.release_conn() - new_file = open(path, 'rb') - return new_file - else: - return response.data - - @staticmethod - def __deserialize_multipart_form_data( - response: urllib3.HTTPResponse - ) -> typing.Dict[str, typing.Any]: - msg = email.message_from_bytes(response.data) - return { - part.get_param("name", header="Content-Disposition"): part.get_payload( - decode=True - ).decode(part.get_content_charset()) - if part.get_content_charset() - else part.get_payload() - for part in msg.get_payload() - } - - def deserialize(self, response: urllib3.HTTPResponse, configuration: Configuration) -> ApiResponse: - content_type = response.getheader('content-type') - deserialized_body = unset - streamed = response.supports_chunked_reads() - - deserialized_headers = unset - if self.headers is not None: - # TODO add header deserialiation here - pass - - if self.content is not None: - if content_type not in self.content: - raise ApiValueError( - f"Invalid content_type returned. Content_type='{content_type}' was returned " - f"when only {str(set(self.content))} are defined for status_code={str(response.status)}" - ) - body_schema = self.content[content_type].schema - if body_schema is None: - # some specs do not define response content media type schemas - return self.response_cls( - response=response, - headers=deserialized_headers, - body=unset - ) - - if self._content_type_is_json(content_type): - body_data = self.__deserialize_json(response) - elif content_type == 'application/octet-stream': - body_data = self.__deserialize_application_octet_stream(response) - elif content_type.startswith('multipart/form-data'): - body_data = self.__deserialize_multipart_form_data(response) - content_type = 'multipart/form-data' - else: - raise NotImplementedError('Deserialization of {} has not yet been implemented'.format(content_type)) - deserialized_body = body_schema.from_openapi_data_oapg( - body_data, _configuration=configuration) - elif streamed: - response.release_conn() - - return self.response_cls( - response=response, - headers=deserialized_headers, - body=deserialized_body - ) - - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - :param pool_threads: The number of threads to use for async requests - to the API. More threads means more concurrent API requests. - """ - - _pool = None - - def __init__( - self, - configuration: typing.Optional[Configuration] = None, - header_name: typing.Optional[str] = None, - header_value: typing.Optional[str] = None, - cookie: typing.Optional[str] = None, - pool_threads: int = 1 - ): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = HTTPHeaderDict() - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.0.0/python' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - if self._pool is None: - atexit.register(self.close) - self._pool = ThreadPool(self.pool_threads) - return self._pool - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - def __call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - - # header parameters - used_headers = HTTPHeaderDict(self.default_headers) - if self.cookie: - headers['Cookie'] = self.cookie - - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) - - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # request url - if host is None: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = host + resource_path - - # perform request and return response - response = self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - def call_api( - self, - resource_path: str, - method: str, - headers: typing.Optional[HTTPHeaderDict] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - auth_settings: typing.Optional[typing.List[str]] = None, - async_req: typing.Optional[bool] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - host: typing.Optional[str] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request (synchronous) and returns deserialized data. - - To make an async_req request, set the async_req parameter. - - :param resource_path: Path to method endpoint. - :param method: Method to call. - :param headers: Header parameters to be - placed in the request header. - :param body: Request body. - :param fields: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings: Auth Settings names for the request. - :param async_req: execute request asynchronously - :type async_req: bool, optional TODO remove, unused - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Also when True, if the openapi spec describes a file download, - the data will be written to a local filesystme file and the BinarySchema - instance will also inherit from FileSchema and FileIO - Default is False. - :type stream: bool, optional - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :param host: api endpoint host - :return: - If async_req parameter is True, - the request will be called asynchronously. - The method will return the request thread. - If parameter async_req is False or missing, - then the method will return the response directly. - """ - - if not async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, str], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Makes the HTTP request using RESTClient.""" - if method == "GET": - return self.rest_client.GET(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "HEAD": - return self.rest_client.HEAD(url, - stream=stream, - timeout=timeout, - headers=headers) - elif method == "OPTIONS": - return self.rest_client.OPTIONS(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "POST": - return self.rest_client.POST(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PUT": - return self.rest_client.PUT(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "PATCH": - return self.rest_client.PATCH(url, - headers=headers, - fields=fields, - stream=stream, - timeout=timeout, - body=body) - elif method == "DELETE": - return self.rest_client.DELETE(url, - headers=headers, - stream=stream, - timeout=timeout, - body=body) - else: - raise ApiValueError( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param auth_settings: Authentication setting identifiers list. - :param resource_path: A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method. - :param body: A object representing the body of the HTTP request. - The object type is the return value of _encoder.default(). - """ - if not auth_settings: - return - - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if not auth_setting: - continue - if auth_setting['in'] == 'cookie': - headers.add('Cookie', auth_setting['value']) - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers.add(auth_setting['key'], auth_setting['value']) - else: - # The HTTP signature scheme requires multiple HTTP headers - # that are calculated dynamically. - signing_info = self.configuration.signing_info - queries = tuple() - auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, queries) - for key, value in auth_headers.items(): - headers.add(key, value) - elif auth_setting['in'] == 'query': - """ TODO implement auth in query - need to pass in prefix_separator_iterator - and need to output resource_path with query params added - """ - raise ApiValueError("Auth in query not yet implemented") - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - -class Api: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - Ensures that: - - required keys are present - - additional properties are not input - - value stored under required keys do not have the value unset - Note: detailed value checking is done in schema classes - """ - missing_required_keys = [] - required_keys_with_unset_values = [] - for required_key in cls.__required_keys__: - if required_key not in data: - missing_required_keys.append(required_key) - continue - value = data[required_key] - if value is unset: - required_keys_with_unset_values.append(required_key) - if missing_required_keys: - raise ApiTypeError( - '{} missing {} required arguments: {}'.format( - cls.__name__, len(missing_required_keys), missing_required_keys - ) - ) - if required_keys_with_unset_values: - raise ApiValueError( - '{} contains invalid unset values for {} required keys: {}'.format( - cls.__name__, len(required_keys_with_unset_values), required_keys_with_unset_values - ) - ) - - disallowed_additional_keys = [] - for key in data: - if key in cls.__required_keys__ or key in cls.__optional_keys__: - continue - disallowed_additional_keys.append(key) - if disallowed_additional_keys: - raise ApiTypeError( - '{} got {} unexpected keyword arguments: {}'.format( - cls.__name__, len(disallowed_additional_keys), disallowed_additional_keys - ) - ) - - def _get_host_oapg( - self, - operation_id: str, - servers: typing.Tuple[typing.Dict[str, str], ...] = tuple(), - host_index: typing.Optional[int] = None - ) -> typing.Optional[str]: - configuration = self.api_client.configuration - try: - if host_index is None: - index = configuration.server_operation_index.get( - operation_id, configuration.server_index - ) - else: - index = host_index - server_variables = configuration.server_operation_variables.get( - operation_id, configuration.server_variables - ) - host = configuration.get_host_from_settings( - index, variables=server_variables, servers=servers - ) - except IndexError: - if servers: - raise ApiValueError( - "Invalid host index. Must be 0 <= index < %s" % - len(servers) - ) - host = None - return host - - -class SerializedRequestBody(typing_extensions.TypedDict, total=False): - body: typing.Union[str, bytes] - fields: typing.Tuple[typing.Union[RequestField, typing.Tuple[str, str]], ...] - - -class RequestBody(StyleFormSerializer, JSONDetector): - """ - A request body parameter - content: content_type to MediaType Schema info - """ - __json_encoder = JSONEncoder() - - def __init__( - self, - content: typing.Dict[str, MediaType], - required: bool = False, - ): - self.required = required - if len(content) == 0: - raise ValueError('Invalid value for content, the content dict must have >= 1 entry') - self.content = content - - def __serialize_json( - self, - in_data: typing.Any - ) -> typing.Dict[str, bytes]: - in_data = self.__json_encoder.default(in_data) - json_str = json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode( - "utf-8" - ) - return dict(body=json_str) - - @staticmethod - def __serialize_text_plain(in_data: typing.Any) -> typing.Dict[str, str]: - if isinstance(in_data, frozendict.frozendict): - raise ValueError('Unable to serialize type frozendict.frozendict to text/plain') - elif isinstance(in_data, tuple): - raise ValueError('Unable to serialize type tuple to text/plain') - elif isinstance(in_data, NoneClass): - raise ValueError('Unable to serialize type NoneClass to text/plain') - elif isinstance(in_data, BoolClass): - raise ValueError('Unable to serialize type BoolClass to text/plain') - return dict(body=str(in_data)) - - def __multipart_json_item(self, key: str, value: Schema) -> RequestField: - json_value = self.__json_encoder.default(value) - request_field = RequestField(name=key, data=json.dumps(json_value)) - request_field.make_multipart(content_type='application/json') - return request_field - - def __multipart_form_item(self, key: str, value: Schema) -> RequestField: - if isinstance(value, str): - request_field = 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.make_multipart(content_type='application/octet-stream') - elif isinstance(value, FileIO): - # TODO use content.encoding to limit allowed content types if they are present - request_field = RequestField.from_tuples(key, (os.path.basename(value.name), value.read())) - value.close() - else: - request_field = self.__multipart_json_item(key=key, value=value) - return request_field - - def __serialize_multipart_form_data( - self, in_data: Schema - ) -> typing.Dict[str, typing.Tuple[RequestField, ...]]: - if not isinstance(in_data, frozendict.frozendict): - raise ValueError(f'Unable to serialize {in_data} to multipart/form-data because it is not a dict of data') - """ - In a multipart/form-data request body, each schema property, or each element of a schema array property, - takes a section in the payload with an internal header as defined by RFC7578. The serialization strategy - for each property of a multipart/form-data request body can be specified in an associated Encoding Object. - - When passing in multipart types, boundaries MAY be used to separate sections of the content being - transferred – thus, the following default Content-Types are defined for multipart: - - If the (object) property is a primitive, or an array of primitive values, the default Content-Type is text/plain - If the property is complex, or an array of complex values, the default Content-Type is application/json - Question: how is the array of primitives encoded? - If the property is a type: string with a contentEncoding, the default Content-Type is application/octet-stream - """ - fields = [] - 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 - for item in value: - request_field = self.__multipart_form_item(key=key, value=item) - fields.append(request_field) - else: - # send an empty array as json because exploding will not send it - request_field = self.__multipart_json_item(key=key, value=value) - fields.append(request_field) - else: - request_field = self.__multipart_form_item(key=key, value=value) - fields.append(request_field) - - return dict(fields=tuple(fields)) - - def __serialize_application_octet_stream(self, in_data: BinarySchema) -> typing.Dict[str, bytes]: - if isinstance(in_data, bytes): - return dict(body=in_data) - # FileIO type - result = dict(body=in_data.read()) - in_data.close() - return result - - def __serialize_application_x_www_form_data( - self, in_data: typing.Any - ) -> SerializedRequestBody: - """ - POST submission of form data in body - """ - if not isinstance(in_data, frozendict.frozendict): - raise ValueError( - f'Unable to serialize {in_data} to application/x-www-form-urlencoded because it is not a dict of data') - cast_in_data = self.__json_encoder.default(in_data) - value = self._serialize_form(cast_in_data, name='', explode=True, percent_encode=True) - return dict(body=value) - - def serialize( - self, in_data: typing.Any, content_type: str - ) -> SerializedRequestBody: - """ - If a str is returned then the result will be assigned to data when making the request - If a tuple is returned then the result will be used as fields input in encode_multipart_formdata - Return a tuple of - - The key of the return dict is - - body for application/json - - encode_multipart and fields for multipart/form-data - """ - media_type = self.content[content_type] - if isinstance(in_data, media_type.schema): - cast_in_data = in_data - elif isinstance(in_data, (dict, frozendict.frozendict)) and in_data: - cast_in_data = media_type.schema(**in_data) - else: - cast_in_data = media_type.schema(in_data) - # TODO check for and use encoding if it exists - # and content_type is multipart or application/x-www-form-urlencoded - if self._content_type_is_json(content_type): - return self.__serialize_json(cast_in_data) - elif content_type == 'text/plain': - return self.__serialize_text_plain(cast_in_data) - elif content_type == 'multipart/form-data': - return self.__serialize_multipart_form_data(cast_in_data) - elif content_type == 'application/x-www-form-urlencoded': - return self.__serialize_application_x_www_form_data(cast_in_data) - elif content_type == 'application/octet-stream': - return self.__serialize_application_octet_stream(cast_in_data) - raise NotImplementedError('Serialization has not yet been implemented for {}'.format(content_type)) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py deleted file mode 100644 index 7840f7726f6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints then import them from -# tags, paths, or path_to_api, or tag_to_api \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py deleted file mode 100644 index 125ec78c894..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/path_to_api.py +++ /dev/null @@ -1,158 +0,0 @@ -import typing_extensions - -from petstore_api.paths import PathValues -from petstore_api.apis.paths.foo import Foo -from petstore_api.apis.paths.pet import Pet -from petstore_api.apis.paths.pet_find_by_status import PetFindByStatus -from petstore_api.apis.paths.pet_find_by_tags import PetFindByTags -from petstore_api.apis.paths.pet_pet_id import PetPetId -from petstore_api.apis.paths.pet_pet_id_upload_image import PetPetIdUploadImage -from petstore_api.apis.paths.store_inventory import StoreInventory -from petstore_api.apis.paths.store_order import StoreOrder -from petstore_api.apis.paths.store_order_order_id import StoreOrderOrderId -from petstore_api.apis.paths.user import User -from petstore_api.apis.paths.user_create_with_array import UserCreateWithArray -from petstore_api.apis.paths.user_create_with_list import UserCreateWithList -from petstore_api.apis.paths.user_login import UserLogin -from petstore_api.apis.paths.user_logout import UserLogout -from petstore_api.apis.paths.user_username import UserUsername -from petstore_api.apis.paths.fake_classname_test import FakeClassnameTest -from petstore_api.apis.paths.fake import Fake -from petstore_api.apis.paths.fake_refs_number import FakeRefsNumber -from petstore_api.apis.paths.fake_refs_mammal import FakeRefsMammal -from petstore_api.apis.paths.fake_refs_string import FakeRefsString -from petstore_api.apis.paths.fake_refs_boolean import FakeRefsBoolean -from petstore_api.apis.paths.fake_refs_arraymodel import FakeRefsArraymodel -from petstore_api.apis.paths.fake_refs_composed_one_of_number_with_validations import FakeRefsComposedOneOfNumberWithValidations -from petstore_api.apis.paths.fake_refs_object_model_with_ref_props import FakeRefsObjectModelWithRefProps -from petstore_api.apis.paths.fake_refs_enum import FakeRefsEnum -from petstore_api.apis.paths.fake_refs_array_of_enums import FakeRefsArrayOfEnums -from petstore_api.apis.paths.fake_additional_properties_with_array_of_enums import FakeAdditionalPropertiesWithArrayOfEnums -from petstore_api.apis.paths.fake_json_form_data import FakeJsonFormData -from petstore_api.apis.paths.fake_inline_additional_properties import FakeInlineAdditionalProperties -from petstore_api.apis.paths.fake_body_with_query_params import FakeBodyWithQueryParams -from petstore_api.apis.paths.another_fake_dummy import AnotherFakeDummy -from petstore_api.apis.paths.fake_body_with_file_schema import FakeBodyWithFileSchema -from petstore_api.apis.paths.fake_case_sensitive_params import FakeCaseSensitiveParams -from petstore_api.apis.paths.fake_test_query_parameters import FakeTestQueryParameters -from petstore_api.apis.paths.fake_pet_id_upload_image_with_required_file import FakePetIdUploadImageWithRequiredFile -from petstore_api.apis.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_ import FakeParameterCollisions1ABAbSelfAB -from petstore_api.apis.paths.fake_upload_file import FakeUploadFile -from petstore_api.apis.paths.fake_upload_files import FakeUploadFiles -from petstore_api.apis.paths.fake_upload_download_file import FakeUploadDownloadFile -from petstore_api.apis.paths.fake_health import FakeHealth -from petstore_api.apis.paths.fake_inline_composition_ import FakeInlineComposition -from petstore_api.apis.paths.fake_obj_in_query import FakeObjInQuery -from petstore_api.apis.paths.fake_ref_obj_in_query import FakeRefObjInQuery -from petstore_api.apis.paths.fake_json_with_charset import FakeJsonWithCharset -from petstore_api.apis.paths.fake_response_without_schema import FakeResponseWithoutSchema -from petstore_api.apis.paths.fake_json_patch import FakeJsonPatch -from petstore_api.apis.paths.fake_delete_coffee_id import FakeDeleteCoffeeId -from petstore_api.apis.paths.fake_query_param_with_json_content_type import FakeQueryParamWithJsonContentType - -PathToApi = typing_extensions.TypedDict( - 'PathToApi', - { - PathValues.FOO: Foo, - PathValues.PET: Pet, - PathValues.PET_FIND_BY_STATUS: PetFindByStatus, - PathValues.PET_FIND_BY_TAGS: PetFindByTags, - PathValues.PET_PET_ID: PetPetId, - PathValues.PET_PET_ID_UPLOAD_IMAGE: PetPetIdUploadImage, - PathValues.STORE_INVENTORY: StoreInventory, - PathValues.STORE_ORDER: StoreOrder, - PathValues.STORE_ORDER_ORDER_ID: StoreOrderOrderId, - PathValues.USER: User, - PathValues.USER_CREATE_WITH_ARRAY: UserCreateWithArray, - PathValues.USER_CREATE_WITH_LIST: UserCreateWithList, - PathValues.USER_LOGIN: UserLogin, - PathValues.USER_LOGOUT: UserLogout, - PathValues.USER_USERNAME: UserUsername, - PathValues.FAKE_CLASSNAME_TEST: FakeClassnameTest, - PathValues.FAKE: Fake, - PathValues.FAKE_REFS_NUMBER: FakeRefsNumber, - PathValues.FAKE_REFS_MAMMAL: FakeRefsMammal, - PathValues.FAKE_REFS_STRING: FakeRefsString, - PathValues.FAKE_REFS_BOOLEAN: FakeRefsBoolean, - PathValues.FAKE_REFS_ARRAYMODEL: FakeRefsArraymodel, - PathValues.FAKE_REFS_COMPOSED_ONE_OF_NUMBER_WITH_VALIDATIONS: FakeRefsComposedOneOfNumberWithValidations, - PathValues.FAKE_REFS_OBJECT_MODEL_WITH_REF_PROPS: FakeRefsObjectModelWithRefProps, - PathValues.FAKE_REFS_ENUM: FakeRefsEnum, - PathValues.FAKE_REFS_ARRAYOFENUMS: FakeRefsArrayOfEnums, - PathValues.FAKE_ADDITIONALPROPERTIESWITHARRAYOFENUMS: FakeAdditionalPropertiesWithArrayOfEnums, - PathValues.FAKE_JSON_FORM_DATA: FakeJsonFormData, - PathValues.FAKE_INLINEADDITIONAL_PROPERTIES: FakeInlineAdditionalProperties, - PathValues.FAKE_BODYWITHQUERYPARAMS: FakeBodyWithQueryParams, - PathValues.ANOTHERFAKE_DUMMY: AnotherFakeDummy, - PathValues.FAKE_BODYWITHFILESCHEMA: FakeBodyWithFileSchema, - PathValues.FAKE_CASESENSITIVEPARAMS: FakeCaseSensitiveParams, - PathValues.FAKE_TESTQUERYPARAMETERS: FakeTestQueryParameters, - PathValues.FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE: FakePetIdUploadImageWithRequiredFile, - PathValues.FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_: FakeParameterCollisions1ABAbSelfAB, - PathValues.FAKE_UPLOAD_FILE: FakeUploadFile, - PathValues.FAKE_UPLOAD_FILES: FakeUploadFiles, - PathValues.FAKE_UPLOAD_DOWNLOAD_FILE: FakeUploadDownloadFile, - PathValues.FAKE_HEALTH: FakeHealth, - PathValues.FAKE_INLINE_COMPOSITION_: FakeInlineComposition, - PathValues.FAKE_OBJ_IN_QUERY: FakeObjInQuery, - PathValues.FAKE_REF_OBJ_IN_QUERY: FakeRefObjInQuery, - PathValues.FAKE_JSON_WITH_CHARSET: FakeJsonWithCharset, - PathValues.FAKE_RESPONSE_WITHOUT_SCHEMA: FakeResponseWithoutSchema, - PathValues.FAKE_JSON_PATCH: FakeJsonPatch, - PathValues.FAKE_DELETE_COFFEE_ID: FakeDeleteCoffeeId, - PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE: FakeQueryParamWithJsonContentType, - } -) - -path_to_api = PathToApi( - { - PathValues.FOO: Foo, - PathValues.PET: Pet, - PathValues.PET_FIND_BY_STATUS: PetFindByStatus, - PathValues.PET_FIND_BY_TAGS: PetFindByTags, - PathValues.PET_PET_ID: PetPetId, - PathValues.PET_PET_ID_UPLOAD_IMAGE: PetPetIdUploadImage, - PathValues.STORE_INVENTORY: StoreInventory, - PathValues.STORE_ORDER: StoreOrder, - PathValues.STORE_ORDER_ORDER_ID: StoreOrderOrderId, - PathValues.USER: User, - PathValues.USER_CREATE_WITH_ARRAY: UserCreateWithArray, - PathValues.USER_CREATE_WITH_LIST: UserCreateWithList, - PathValues.USER_LOGIN: UserLogin, - PathValues.USER_LOGOUT: UserLogout, - PathValues.USER_USERNAME: UserUsername, - PathValues.FAKE_CLASSNAME_TEST: FakeClassnameTest, - PathValues.FAKE: Fake, - PathValues.FAKE_REFS_NUMBER: FakeRefsNumber, - PathValues.FAKE_REFS_MAMMAL: FakeRefsMammal, - PathValues.FAKE_REFS_STRING: FakeRefsString, - PathValues.FAKE_REFS_BOOLEAN: FakeRefsBoolean, - PathValues.FAKE_REFS_ARRAYMODEL: FakeRefsArraymodel, - PathValues.FAKE_REFS_COMPOSED_ONE_OF_NUMBER_WITH_VALIDATIONS: FakeRefsComposedOneOfNumberWithValidations, - PathValues.FAKE_REFS_OBJECT_MODEL_WITH_REF_PROPS: FakeRefsObjectModelWithRefProps, - PathValues.FAKE_REFS_ENUM: FakeRefsEnum, - PathValues.FAKE_REFS_ARRAYOFENUMS: FakeRefsArrayOfEnums, - PathValues.FAKE_ADDITIONALPROPERTIESWITHARRAYOFENUMS: FakeAdditionalPropertiesWithArrayOfEnums, - PathValues.FAKE_JSON_FORM_DATA: FakeJsonFormData, - PathValues.FAKE_INLINEADDITIONAL_PROPERTIES: FakeInlineAdditionalProperties, - PathValues.FAKE_BODYWITHQUERYPARAMS: FakeBodyWithQueryParams, - PathValues.ANOTHERFAKE_DUMMY: AnotherFakeDummy, - PathValues.FAKE_BODYWITHFILESCHEMA: FakeBodyWithFileSchema, - PathValues.FAKE_CASESENSITIVEPARAMS: FakeCaseSensitiveParams, - PathValues.FAKE_TESTQUERYPARAMETERS: FakeTestQueryParameters, - PathValues.FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE: FakePetIdUploadImageWithRequiredFile, - PathValues.FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_: FakeParameterCollisions1ABAbSelfAB, - PathValues.FAKE_UPLOAD_FILE: FakeUploadFile, - PathValues.FAKE_UPLOAD_FILES: FakeUploadFiles, - PathValues.FAKE_UPLOAD_DOWNLOAD_FILE: FakeUploadDownloadFile, - PathValues.FAKE_HEALTH: FakeHealth, - PathValues.FAKE_INLINE_COMPOSITION_: FakeInlineComposition, - PathValues.FAKE_OBJ_IN_QUERY: FakeObjInQuery, - PathValues.FAKE_REF_OBJ_IN_QUERY: FakeRefObjInQuery, - PathValues.FAKE_JSON_WITH_CHARSET: FakeJsonWithCharset, - PathValues.FAKE_RESPONSE_WITHOUT_SCHEMA: FakeResponseWithoutSchema, - PathValues.FAKE_JSON_PATCH: FakeJsonPatch, - PathValues.FAKE_DELETE_COFFEE_ID: FakeDeleteCoffeeId, - PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE: FakeQueryParamWithJsonContentType, - } -) diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/__init__.py deleted file mode 100644 index a0e17c5536e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.apis.path_to_api import path_to_api diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/another_fake_dummy.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/another_fake_dummy.py deleted file mode 100644 index 8fafb8f1156..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/another_fake_dummy.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.another_fake_dummy.patch import ApiForpatch - - -class AnotherFakeDummy( - ApiForpatch, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake.py deleted file mode 100644 index f8de5e6f9d9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake.py +++ /dev/null @@ -1,13 +0,0 @@ -from petstore_api.paths.fake.get import ApiForget -from petstore_api.paths.fake.post import ApiForpost -from petstore_api.paths.fake.delete import ApiFordelete -from petstore_api.paths.fake.patch import ApiForpatch - - -class Fake( - ApiForget, - ApiForpost, - ApiFordelete, - ApiForpatch, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py deleted file mode 100644 index 3df79a3103d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_additional_properties_with_array_of_enums.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_additional_properties_with_array_of_enums.get import ApiForget - - -class FakeAdditionalPropertiesWithArrayOfEnums( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_file_schema.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_file_schema.py deleted file mode 100644 index d95c287ecc9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_file_schema.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_body_with_file_schema.put import ApiForput - - -class FakeBodyWithFileSchema( - ApiForput, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_query_params.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_query_params.py deleted file mode 100644 index 4c77fc0c0dc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_body_with_query_params.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_body_with_query_params.put import ApiForput - - -class FakeBodyWithQueryParams( - ApiForput, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_case_sensitive_params.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_case_sensitive_params.py deleted file mode 100644 index c5dafb43a08..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_case_sensitive_params.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_case_sensitive_params.put import ApiForput - - -class FakeCaseSensitiveParams( - ApiForput, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_classname_test.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_classname_test.py deleted file mode 100644 index 090ec6025f7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_classname_test.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_classname_test.patch import ApiForpatch - - -class FakeClassnameTest( - ApiForpatch, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_delete_coffee_id.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_delete_coffee_id.py deleted file mode 100644 index 589ba701a7b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_delete_coffee_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_delete_coffee_id.delete import ApiFordelete - - -class FakeDeleteCoffeeId( - ApiFordelete, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_health.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_health.py deleted file mode 100644 index fc5bf3258bd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_health.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_health.get import ApiForget - - -class FakeHealth( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_additional_properties.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_additional_properties.py deleted file mode 100644 index 57bdd0745ab..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_additional_properties.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_inline_additional_properties.post import ApiForpost - - -class FakeInlineAdditionalProperties( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_composition_.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_composition_.py deleted file mode 100644 index 9854c250b1b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_inline_composition_.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_inline_composition_.post import ApiForpost - - -class FakeInlineComposition( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_form_data.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_form_data.py deleted file mode 100644 index 1533f9805ec..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_form_data.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_json_form_data.get import ApiForget - - -class FakeJsonFormData( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_patch.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_patch.py deleted file mode 100644 index 53e563dbdb9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_patch.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_json_patch.patch import ApiForpatch - - -class FakeJsonPatch( - ApiForpatch, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_with_charset.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_with_charset.py deleted file mode 100644 index a1a4c38e671..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_json_with_charset.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_json_with_charset.post import ApiForpost - - -class FakeJsonWithCharset( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_obj_in_query.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_obj_in_query.py deleted file mode 100644 index a0515808141..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_obj_in_query.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_obj_in_query.get import ApiForget - - -class FakeObjInQuery( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_.py deleted file mode 100644 index e99db37cd94..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_.post import ApiForpost - - -class FakeParameterCollisions1ABAbSelfAB( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py deleted file mode 100644 index 06b4b53bbd6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_pet_id_upload_image_with_required_file.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_pet_id_upload_image_with_required_file.post import ApiForpost - - -class FakePetIdUploadImageWithRequiredFile( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py deleted file mode 100644 index 96aa0592a02..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_query_param_with_json_content_type.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_query_param_with_json_content_type.get import ApiForget - - -class FakeQueryParamWithJsonContentType( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_ref_obj_in_query.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_ref_obj_in_query.py deleted file mode 100644 index 5cb347c09ce..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_ref_obj_in_query.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_ref_obj_in_query.get import ApiForget - - -class FakeRefObjInQuery( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_array_of_enums.py deleted file mode 100644 index 8aca3fb8d06..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_array_of_enums.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_array_of_enums.post import ApiForpost - - -class FakeRefsArrayOfEnums( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_arraymodel.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_arraymodel.py deleted file mode 100644 index de94cbe4983..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_arraymodel.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_arraymodel.post import ApiForpost - - -class FakeRefsArraymodel( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_boolean.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_boolean.py deleted file mode 100644 index d3a08723b2f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_boolean.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_boolean.post import ApiForpost - - -class FakeRefsBoolean( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py deleted file mode 100644 index 2caf9048a4d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_composed_one_of_number_with_validations.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_composed_one_of_number_with_validations.post import ApiForpost - - -class FakeRefsComposedOneOfNumberWithValidations( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_enum.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_enum.py deleted file mode 100644 index b05f5b2d012..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_enum.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_enum.post import ApiForpost - - -class FakeRefsEnum( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_mammal.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_mammal.py deleted file mode 100644 index fe0e0b427d0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_mammal.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_mammal.post import ApiForpost - - -class FakeRefsMammal( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_number.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_number.py deleted file mode 100644 index af4111830d7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_number.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_number.post import ApiForpost - - -class FakeRefsNumber( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py deleted file mode 100644 index 1554afa997a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_object_model_with_ref_props.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_object_model_with_ref_props.post import ApiForpost - - -class FakeRefsObjectModelWithRefProps( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_string.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_string.py deleted file mode 100644 index 9420eeb048f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_refs_string.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_refs_string.post import ApiForpost - - -class FakeRefsString( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_response_without_schema.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_response_without_schema.py deleted file mode 100644 index 56590de8d0b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_response_without_schema.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_response_without_schema.get import ApiForget - - -class FakeResponseWithoutSchema( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py deleted file mode 100644 index bbfebcdcedb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_test_query_parameters.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_test_query_parameters.put import ApiForput - - -class FakeTestQueryParameters( - ApiForput, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_download_file.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_download_file.py deleted file mode 100644 index f41a00e3e45..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_download_file.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_upload_download_file.post import ApiForpost - - -class FakeUploadDownloadFile( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_file.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_file.py deleted file mode 100644 index b080fcd26c7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_file.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_upload_file.post import ApiForpost - - -class FakeUploadFile( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_files.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_files.py deleted file mode 100644 index 6f47e0b8f09..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/fake_upload_files.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.fake_upload_files.post import ApiForpost - - -class FakeUploadFiles( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/foo.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/foo.py deleted file mode 100644 index 237a0fba70b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/foo.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.foo.get import ApiForget - - -class Foo( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet.py deleted file mode 100644 index 8e9f07940b6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet.py +++ /dev/null @@ -1,9 +0,0 @@ -from petstore_api.paths.pet.put import ApiForput -from petstore_api.paths.pet.post import ApiForpost - - -class Pet( - ApiForput, - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_status.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_status.py deleted file mode 100644 index 86a6eebf135..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_status.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.pet_find_by_status.get import ApiForget - - -class PetFindByStatus( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_tags.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_tags.py deleted file mode 100644 index c0f4090e4eb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_find_by_tags.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.pet_find_by_tags.get import ApiForget - - -class PetFindByTags( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id.py deleted file mode 100644 index 6290395b837..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id.py +++ /dev/null @@ -1,11 +0,0 @@ -from petstore_api.paths.pet_pet_id.get import ApiForget -from petstore_api.paths.pet_pet_id.post import ApiForpost -from petstore_api.paths.pet_pet_id.delete import ApiFordelete - - -class PetPetId( - ApiForget, - ApiForpost, - ApiFordelete, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id_upload_image.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id_upload_image.py deleted file mode 100644 index 92bfe397009..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/pet_pet_id_upload_image.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.pet_pet_id_upload_image.post import ApiForpost - - -class PetPetIdUploadImage( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_inventory.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_inventory.py deleted file mode 100644 index f614016a111..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_inventory.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.store_inventory.get import ApiForget - - -class StoreInventory( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order.py deleted file mode 100644 index 827bc76647c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.store_order.post import ApiForpost - - -class StoreOrder( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order_order_id.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order_order_id.py deleted file mode 100644 index 1436ff0b936..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/store_order_order_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from petstore_api.paths.store_order_order_id.get import ApiForget -from petstore_api.paths.store_order_order_id.delete import ApiFordelete - - -class StoreOrderOrderId( - ApiForget, - ApiFordelete, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user.py deleted file mode 100644 index b708c602e74..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.user.post import ApiForpost - - -class User( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_array.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_array.py deleted file mode 100644 index d3d5904cebc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_array.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.user_create_with_array.post import ApiForpost - - -class UserCreateWithArray( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_list.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_list.py deleted file mode 100644 index f8f3f34d400..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_create_with_list.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.user_create_with_list.post import ApiForpost - - -class UserCreateWithList( - ApiForpost, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_login.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_login.py deleted file mode 100644 index 5cd6b4e0f89..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_login.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.user_login.get import ApiForget - - -class UserLogin( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_logout.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_logout.py deleted file mode 100644 index 621e15a8a31..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_logout.py +++ /dev/null @@ -1,7 +0,0 @@ -from petstore_api.paths.user_logout.get import ApiForget - - -class UserLogout( - ApiForget, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_username.py b/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_username.py deleted file mode 100644 index 16710585ee0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/paths/user_username.py +++ /dev/null @@ -1,11 +0,0 @@ -from petstore_api.paths.user_username.get import ApiForget -from petstore_api.paths.user_username.put import ApiForput -from petstore_api.paths.user_username.delete import ApiFordelete - - -class UserUsername( - ApiForget, - ApiForput, - ApiFordelete, -): - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tag_to_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tag_to_api.py deleted file mode 100644 index ad42a5d1dec..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tag_to_api.py +++ /dev/null @@ -1,35 +0,0 @@ -import typing_extensions - -from petstore_api.apis.tags import TagValues -from petstore_api.apis.tags.pet_api import PetApi -from petstore_api.apis.tags.store_api import StoreApi -from petstore_api.apis.tags.user_api import UserApi -from petstore_api.apis.tags.another_fake_api import AnotherFakeApi -from petstore_api.apis.tags.default_api import DefaultApi -from petstore_api.apis.tags.fake_api import FakeApi -from petstore_api.apis.tags.fake_classname_tags123_api import FakeClassnameTags123Api - -TagToApi = typing_extensions.TypedDict( - 'TagToApi', - { - TagValues.PET: PetApi, - TagValues.STORE: StoreApi, - TagValues.USER: UserApi, - TagValues.ANOTHERFAKE: AnotherFakeApi, - TagValues.DEFAULT: DefaultApi, - TagValues.FAKE: FakeApi, - TagValues.FAKE_CLASSNAME_TAGS_123: FakeClassnameTags123Api, - } -) - -tag_to_api = TagToApi( - { - TagValues.PET: PetApi, - TagValues.STORE: StoreApi, - TagValues.USER: UserApi, - TagValues.ANOTHERFAKE: AnotherFakeApi, - TagValues.DEFAULT: DefaultApi, - TagValues.FAKE: FakeApi, - TagValues.FAKE_CLASSNAME_TAGS_123: FakeClassnameTags123Api, - } -) diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/__init__.py deleted file mode 100644 index a8ec6fddd9a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.apis.tag_to_api import tag_to_api - -import enum - - -class TagValues(str, enum.Enum): - PET = "pet" - STORE = "store" - USER = "user" - ANOTHERFAKE = "$another-fake?" - DEFAULT = "default" - FAKE = "fake" - FAKE_CLASSNAME_TAGS_123 = "fake_classname_tags 123#$%^" diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/another_fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/another_fake_api.py deleted file mode 100644 index 129fbd75107..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/another_fake_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.another_fake_dummy.patch import Call123TestSpecialTags - - -class AnotherFakeApi( - Call123TestSpecialTags, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/default_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/default_api.py deleted file mode 100644 index 99639a6994d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/default_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.foo.get import FooGet - - -class DefaultApi( - FooGet, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py deleted file mode 100644 index f232a5cc5e0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_api.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.fake_additional_properties_with_array_of_enums.get import AdditionalPropertiesWithArrayOfEnums -from petstore_api.paths.fake_refs_arraymodel.post import ArrayModel -from petstore_api.paths.fake_refs_array_of_enums.post import ArrayOfEnums -from petstore_api.paths.fake_body_with_file_schema.put import BodyWithFileSchema -from petstore_api.paths.fake_body_with_query_params.put import BodyWithQueryParams -from petstore_api.paths.fake_refs_boolean.post import Boolean -from petstore_api.paths.fake_case_sensitive_params.put import CaseSensitiveParams -from petstore_api.paths.fake.patch import ClientModel -from petstore_api.paths.fake_refs_composed_one_of_number_with_validations.post import ComposedOneOfDifferentTypes -from petstore_api.paths.fake_delete_coffee_id.delete import DeleteCoffee -from petstore_api.paths.fake.post import EndpointParameters -from petstore_api.paths.fake.get import EnumParameters -from petstore_api.paths.fake_health.get import FakeHealthGet -from petstore_api.paths.fake.delete import GroupParameters -from petstore_api.paths.fake_inline_additional_properties.post import InlineAdditionalProperties -from petstore_api.paths.fake_inline_composition_.post import InlineComposition -from petstore_api.paths.fake_json_form_data.get import JsonFormData -from petstore_api.paths.fake_json_patch.patch import JsonPatch -from petstore_api.paths.fake_json_with_charset.post import JsonWithCharset -from petstore_api.paths.fake_refs_mammal.post import Mammal -from petstore_api.paths.fake_refs_number.post import NumberWithValidations -from petstore_api.paths.fake_obj_in_query.get import ObjectInQuery -from petstore_api.paths.fake_refs_object_model_with_ref_props.post import ObjectModelWithRefProps -from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_.post import ParameterCollisions -from petstore_api.paths.fake_query_param_with_json_content_type.get import QueryParamWithJsonContentType -from petstore_api.paths.fake_test_query_parameters.put import QueryParameterCollectionFormat -from petstore_api.paths.fake_ref_obj_in_query.get import RefObjectInQuery -from petstore_api.paths.fake_response_without_schema.get import ResponseWithoutSchema -from petstore_api.paths.fake_refs_string.post import String -from petstore_api.paths.fake_refs_enum.post import StringEnum -from petstore_api.paths.fake_upload_download_file.post import UploadDownloadFile -from petstore_api.paths.fake_upload_file.post import UploadFile -from petstore_api.paths.fake_upload_files.post import UploadFiles - - -class FakeApi( - AdditionalPropertiesWithArrayOfEnums, - ArrayModel, - ArrayOfEnums, - BodyWithFileSchema, - BodyWithQueryParams, - Boolean, - CaseSensitiveParams, - ClientModel, - ComposedOneOfDifferentTypes, - DeleteCoffee, - EndpointParameters, - EnumParameters, - FakeHealthGet, - GroupParameters, - InlineAdditionalProperties, - InlineComposition, - JsonFormData, - JsonPatch, - JsonWithCharset, - Mammal, - NumberWithValidations, - ObjectInQuery, - ObjectModelWithRefProps, - ParameterCollisions, - QueryParamWithJsonContentType, - QueryParameterCollectionFormat, - RefObjectInQuery, - ResponseWithoutSchema, - String, - StringEnum, - UploadDownloadFile, - UploadFile, - UploadFiles, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_classname_tags123_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_classname_tags123_api.py deleted file mode 100644 index 9997b64ba73..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/fake_classname_tags123_api.py +++ /dev/null @@ -1,23 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.fake_classname_test.patch import Classname - - -class FakeClassnameTags123Api( - Classname, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/pet_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/pet_api.py deleted file mode 100644 index 402e69c9cfc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/pet_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.pet.post import AddPet -from petstore_api.paths.pet_pet_id.delete import DeletePet -from petstore_api.paths.pet_find_by_status.get import FindPetsByStatus -from petstore_api.paths.pet_find_by_tags.get import FindPetsByTags -from petstore_api.paths.pet_pet_id.get import GetPetById -from petstore_api.paths.pet.put import UpdatePet -from petstore_api.paths.pet_pet_id.post import UpdatePetWithForm -from petstore_api.paths.fake_pet_id_upload_image_with_required_file.post import UploadFileWithRequiredFile -from petstore_api.paths.pet_pet_id_upload_image.post import UploadImage - - -class PetApi( - AddPet, - DeletePet, - FindPetsByStatus, - FindPetsByTags, - GetPetById, - UpdatePet, - UpdatePetWithForm, - UploadFileWithRequiredFile, - UploadImage, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/store_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/store_api.py deleted file mode 100644 index b9e1d09ed52..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/store_api.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.store_order_order_id.delete import DeleteOrder -from petstore_api.paths.store_inventory.get import GetInventory -from petstore_api.paths.store_order_order_id.get import GetOrderById -from petstore_api.paths.store_order.post import PlaceOrder - - -class StoreApi( - DeleteOrder, - GetInventory, - GetOrderById, - PlaceOrder, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/user_api.py b/samples/openapi3/client/petstore/python/petstore_api/apis/tags/user_api.py deleted file mode 100644 index b84994811c1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/apis/tags/user_api.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from petstore_api.paths.user.post import CreateUser -from petstore_api.paths.user_create_with_array.post import CreateUsersWithArrayInput -from petstore_api.paths.user_create_with_list.post import CreateUsersWithListInput -from petstore_api.paths.user_username.delete import DeleteUser -from petstore_api.paths.user_username.get import GetUserByName -from petstore_api.paths.user_login.get import LoginUser -from petstore_api.paths.user_logout.get import LogoutUser -from petstore_api.paths.user_username.put import UpdateUser - - -class UserApi( - CreateUser, - CreateUsersWithArrayInput, - CreateUsersWithListInput, - DeleteUser, - GetUserByName, - LoginUser, - LogoutUser, - UpdateUser, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/configuration.py b/samples/openapi3/client/petstore/python/petstore_api/configuration.py deleted file mode 100644 index 674b3b225af..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/configuration.py +++ /dev/null @@ -1,621 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import copy -import logging -import multiprocessing -import sys -import urllib3 - -from http import client as http_client -from petstore_api.exceptions import ApiValueError - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems', - 'uniqueItems', 'maxProperties', 'minProperties', -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param host: Base url - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer) - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication - :param password: Password for HTTP basic authentication - :param discard_unknown_keys: Boolean value indicating whether to discard - unknown properties. A server may send a response that includes additional - properties that are not known by the client in the following scenarios: - 1. The OpenAPI document is incomplete, i.e. it does not match the server - implementation. - 2. The client was generated using an older version of the OpenAPI document - and the server has been upgraded since then. - If a schema in the OpenAPI document defines the additionalProperties attribute, - then all undeclared properties received by the server are injected into the - additional properties map. In that case, there are undeclared properties, and - nothing to discard. - :param disabled_client_side_validations (string): Comma-separated list of - JSON schema validation keywords to disable JSON schema structural validation - rules. The following keywords may be specified: multipleOf, maximum, - exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern, - maxItems, minItems. - By default, the validation is performed for data generated locally by the client - and data received from the server, independent of any validation performed by - the server side. If the input data does not satisfy the JSON schema validation - rules specified in the OpenAPI document, an exception is raised. - If disabled_client_side_validations is set, structural validation is - disabled. This can be useful to troubleshoot data validation problem, such as - when the OpenAPI document validation rules do not match the actual API data - received by the server. - :param signing_info: Configuration parameters for the HTTP signature security scheme. - Must be an instance of petstore_api.signing.HttpSigningConfiguration - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = petstore_api.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - - HTTP Basic Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: basic - - Configure API client with HTTP basic authentication: - -conf = petstore_api.Configuration( - username='the-user', - password='the-password', -) - - - HTTP Signature Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - http_basic_auth: - type: http - scheme: signature - - Configure API client with HTTP signature authentication. Use the 'hs2019' signature scheme, - sign the HTTP requests with the RSA-SSA-PSS signature algorithm, and set the expiration time - of the signature to 5 minutes after the signature has been created. - Note you can use the constants defined in the petstore_api.signing module, and you can - also specify arbitrary HTTP headers to be included in the HTTP signature, except for the - 'Authorization' header, which is used to carry the signature. - - One may be tempted to sign all headers by default, but in practice it rarely works. - This is because explicit proxies, transparent proxies, TLS termination endpoints or - load balancers may add/modify/remove headers. Include the HTTP headers that you know - are not going to be modified in transit. - -conf = petstore_api.Configuration( - signing_info = petstore_api.signing.HttpSigningConfiguration( - key_id = 'my-key-id', - private_key_path = 'rsa.pem', - signing_scheme = petstore_api.signing.SCHEME_HS2019, - signing_algorithm = petstore_api.signing.ALGORITHM_RSASSA_PSS, - signed_headers = [petstore_api.signing.HEADER_REQUEST_TARGET, - petstore_api.signing.HEADER_CREATED, - petstore_api.signing.HEADER_EXPIRES, - petstore_api.signing.HEADER_HOST, - petstore_api.signing.HEADER_DATE, - petstore_api.signing.HEADER_DIGEST, - 'Content-Type', - 'User-Agent' - ], - signature_max_validity = datetime.timedelta(minutes=5) - ) -) - """ - - _default = None - - def __init__( - self, - host=None, - api_key=None, - api_key_prefix=None, - username=None, - password=None, - discard_unknown_keys=False, - disabled_client_side_validations="", - signing_info=None, - server_index=None, - server_variables=None, - server_operation_index=None, - server_operation_variables=None, - access_token=None, - ): - """Constructor - """ - self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.discard_unknown_keys = discard_unknown_keys - self.disabled_client_side_validations = disabled_client_side_validations - if signing_info is not None: - signing_info.host = host - self.signing_info = signing_info - """The HTTP signing configuration - """ - self.access_token = None - """access token for OAuth/Bearer - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("petstore_api") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - self.retries = None - """Adding retries to override urllib3 default value 3 - """ - # Enable client side validation - self.client_side_validation = True - - # Options to pass down to the underlying urllib3 socket - self.socket_options = None - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, value): - object.__setattr__(self, name, value) - if name == 'disabled_client_side_validations': - s = set(filter(None, value.split(','))) - for v in s: - if v not in JSON_SCHEMA_VALIDATION_KEYWORDS: - raise ApiValueError( - "Invalid keyword: '{0}''".format(v)) - self._disabled_client_side_validations = s - if name == "signing_info" and value is not None: - # Ensure the host parameter from signing info is the same as - # Configuration.host. - value.host = self.host - - @classmethod - def set_default(cls, default): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - def get_default_copy(cls): - """Return new instance of configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on http_client debug - http_client.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if self.access_token is not None: - auth['petstore_auth'] = { - 'type': 'oauth2', - 'in': 'header', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - if 'api_key' in self.api_key: - auth['api_key'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'api_key', - 'value': self.get_api_key_with_prefix( - 'api_key', - ), - } - if 'api_key_query' in self.api_key: - auth['api_key_query'] = { - 'type': 'api_key', - 'in': 'query', - 'key': 'api_key_query', - 'value': self.get_api_key_with_prefix( - 'api_key_query', - ), - } - if self.username is not None and self.password is not None: - auth['http_basic_test'] = { - 'type': 'basic', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_basic_auth_token() - } - if self.access_token is not None: - auth['bearer_test'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - if self.signing_info is not None: - auth['http_signature_test'] = { - 'type': 'http-signature', - 'in': 'header', - 'key': 'Authorization', - 'value': None # Signature headers are calculated for every HTTP request - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "http://{server}.swagger.io:{port}/v2", - 'description': "petstore server", - 'variables': { - 'server': { - 'description': "No description provided", - 'default_value': "petstore", - 'enum_values': [ - "petstore", - "qa-petstore", - "dev-petstore" - ] - }, - 'port': { - 'description': "No description provided", - 'default_value': "80", - 'enum_values': [ - "80", - "8080" - ] - } - } - }, - { - 'url': "https://localhost:8080/{version}", - 'description': "The local server", - 'variables': { - 'version': { - 'description': "No description provided", - 'default_value': "v2", - 'enum_values': [ - "v1", - "v2" - ] - } - } - } - ] - - def get_host_from_settings(self, index, variables=None, servers=None): - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value): - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py b/samples/openapi3/client/petstore/python/petstore_api/exceptions.py deleted file mode 100644 index 3bfb8228388..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/exceptions.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -import dataclasses -import typing - -from urllib3._collections import HTTPHeaderDict - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -T = typing.TypeVar("T") - - -@dataclasses.dataclass -class ApiException(OpenApiException, typing.Generic[T]): - status: int - reason: str - api_response: typing.Optional[T] = None - - @property - def body(self) -> typing.Union[str, bytes, None]: - if not self.api_response: - return None - return self.api_response.response.data - - @property - def headers(self) -> typing.Optional[HTTPHeaderDict]: - if not self.api_response: - return None - return self.api_response.response.getheaders() - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/model/__init__.py deleted file mode 100644 index 027452f37a8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# we can not import model classes here because that would create a circular -# reference which would not work in python2 -# do not import all models into this module because that uses a lot of memory and stack frames -# if you need the ability to import all models from one package, import them with -# from petstore_api.models import ModelA, ModelB diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py deleted file mode 100644 index 3417b0b35cc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py +++ /dev/null @@ -1,307 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class map_property( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_property': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class map_of_map_property( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'map_of_map_property': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anytype_1 = schemas.AnyTypeSchema - map_with_undeclared_properties_anytype_1 = schemas.DictSchema - map_with_undeclared_properties_anytype_2 = schemas.DictSchema - - - class map_with_undeclared_properties_anytype_3( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.AnyTypeSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'map_with_undeclared_properties_anytype_3': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class empty_map( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.NotAnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'empty_map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class map_with_undeclared_properties_string( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_with_undeclared_properties_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "map_property": map_property, - "map_of_map_property": map_of_map_property, - "anytype_1": anytype_1, - "map_with_undeclared_properties_anytype_1": map_with_undeclared_properties_anytype_1, - "map_with_undeclared_properties_anytype_2": map_with_undeclared_properties_anytype_2, - "map_with_undeclared_properties_anytype_3": map_with_undeclared_properties_anytype_3, - "empty_map": empty_map, - "map_with_undeclared_properties_string": map_with_undeclared_properties_string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_property"]) -> MetaOapg.properties.map_property: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_of_map_property"]) -> MetaOapg.properties.map_of_map_property: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anytype_1"]) -> MetaOapg.properties.anytype_1: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_1"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_1: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_2"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_2: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_3"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_3: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["empty_map"]) -> MetaOapg.properties.empty_map: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_string"]) -> MetaOapg.properties.map_with_undeclared_properties_string: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_property"]) -> typing.Union[MetaOapg.properties.map_property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_of_map_property"]) -> typing.Union[MetaOapg.properties.map_of_map_property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anytype_1"]) -> typing.Union[MetaOapg.properties.anytype_1, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_1"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_1, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_2"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_2, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_3"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_3, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["empty_map"]) -> typing.Union[MetaOapg.properties.empty_map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_string"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - map_property: typing.Union[MetaOapg.properties.map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_map_property: typing.Union[MetaOapg.properties.map_of_map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - anytype_1: typing.Union[MetaOapg.properties.anytype_1, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_1: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_1, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_2: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_2, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_3: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_3, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - empty_map: typing.Union[MetaOapg.properties.empty_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_string: typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalPropertiesClass': - return super().__new__( - cls, - *_args, - map_property=map_property, - map_of_map_property=map_of_map_property, - anytype_1=anytype_1, - map_with_undeclared_properties_anytype_1=map_with_undeclared_properties_anytype_1, - map_with_undeclared_properties_anytype_2=map_with_undeclared_properties_anytype_2, - map_with_undeclared_properties_anytype_3=map_with_undeclared_properties_anytype_3, - empty_map=empty_map, - map_with_undeclared_properties_string=map_with_undeclared_properties_string, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi deleted file mode 100644 index 3417b0b35cc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.pyi +++ /dev/null @@ -1,307 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class map_property( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_property': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class map_of_map_property( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'map_of_map_property': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anytype_1 = schemas.AnyTypeSchema - map_with_undeclared_properties_anytype_1 = schemas.DictSchema - map_with_undeclared_properties_anytype_2 = schemas.DictSchema - - - class map_with_undeclared_properties_anytype_3( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.AnyTypeSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'map_with_undeclared_properties_anytype_3': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class empty_map( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.NotAnyTypeSchema - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'empty_map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class map_with_undeclared_properties_string( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_with_undeclared_properties_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "map_property": map_property, - "map_of_map_property": map_of_map_property, - "anytype_1": anytype_1, - "map_with_undeclared_properties_anytype_1": map_with_undeclared_properties_anytype_1, - "map_with_undeclared_properties_anytype_2": map_with_undeclared_properties_anytype_2, - "map_with_undeclared_properties_anytype_3": map_with_undeclared_properties_anytype_3, - "empty_map": empty_map, - "map_with_undeclared_properties_string": map_with_undeclared_properties_string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_property"]) -> MetaOapg.properties.map_property: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_of_map_property"]) -> MetaOapg.properties.map_of_map_property: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anytype_1"]) -> MetaOapg.properties.anytype_1: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_1"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_1: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_2"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_2: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_3"]) -> MetaOapg.properties.map_with_undeclared_properties_anytype_3: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["empty_map"]) -> MetaOapg.properties.empty_map: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_with_undeclared_properties_string"]) -> MetaOapg.properties.map_with_undeclared_properties_string: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_property"]) -> typing.Union[MetaOapg.properties.map_property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_of_map_property"]) -> typing.Union[MetaOapg.properties.map_of_map_property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anytype_1"]) -> typing.Union[MetaOapg.properties.anytype_1, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_1"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_1, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_2"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_2, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_anytype_3"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_3, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["empty_map"]) -> typing.Union[MetaOapg.properties.empty_map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_with_undeclared_properties_string"]) -> typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["map_property", "map_of_map_property", "anytype_1", "map_with_undeclared_properties_anytype_1", "map_with_undeclared_properties_anytype_2", "map_with_undeclared_properties_anytype_3", "empty_map", "map_with_undeclared_properties_string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - map_property: typing.Union[MetaOapg.properties.map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_map_property: typing.Union[MetaOapg.properties.map_of_map_property, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - anytype_1: typing.Union[MetaOapg.properties.anytype_1, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_1: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_1, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_2: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_2, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_anytype_3: typing.Union[MetaOapg.properties.map_with_undeclared_properties_anytype_3, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - empty_map: typing.Union[MetaOapg.properties.empty_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_with_undeclared_properties_string: typing.Union[MetaOapg.properties.map_with_undeclared_properties_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalPropertiesClass': - return super().__new__( - cls, - *_args, - map_property=map_property, - map_of_map_property=map_of_map_property, - anytype_1=anytype_1, - map_with_undeclared_properties_anytype_1=map_with_undeclared_properties_anytype_1, - map_with_undeclared_properties_anytype_2=map_with_undeclared_properties_anytype_2, - map_with_undeclared_properties_anytype_3=map_with_undeclared_properties_anytype_3, - empty_map=empty_map, - map_with_undeclared_properties_string=map_with_undeclared_properties_string, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py deleted file mode 100644 index 102c99fac1e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.py +++ /dev/null @@ -1,198 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesValidator( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.AnyTypeSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - min_length = 3 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_2( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - max_length = 5 - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_2': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - cls.all_of_2, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalPropertiesValidator': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi deleted file mode 100644 index 41f0865542e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_validator.pyi +++ /dev/null @@ -1,196 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesValidator( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_0( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.AnyTypeSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_0': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class all_of_2( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'all_of_2': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - cls.all_of_1, - cls.all_of_2, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AdditionalPropertiesValidator': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py deleted file mode 100644 index a2955cc292f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesWithArrayOfEnums( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class additional_properties( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EnumClass']: - return EnumClass - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'additional_properties': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EnumClass': - return super().__getitem__(i) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, list, tuple, ], - ) -> 'AdditionalPropertiesWithArrayOfEnums': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi deleted file mode 100644 index a2955cc292f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_with_array_of_enums.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AdditionalPropertiesWithArrayOfEnums( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class additional_properties( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['EnumClass']: - return EnumClass - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['EnumClass'], typing.List['EnumClass']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'additional_properties': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'EnumClass': - return super().__getitem__(i) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, list, tuple, ], - ) -> 'AdditionalPropertiesWithArrayOfEnums': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.enum_class import EnumClass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.py b/samples/openapi3/client/petstore/python/petstore_api/model/address.py deleted file mode 100644 index 46e70b0aac0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Address( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.IntSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'Address': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi deleted file mode 100644 index 46e70b0aac0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/address.pyi +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Address( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.IntSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'Address': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py deleted file mode 100644 index 10cc8231ca0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Animal( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - @staticmethod - def discriminator(): - return { - 'className': { - 'Cat': Cat, - 'Dog': Dog, - } - } - - class properties: - className = schemas.StrSchema - color = schemas.StrSchema - __annotations__ = { - "className": className, - "color": color, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", "color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", "color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Animal': - return super().__new__( - cls, - *_args, - className=className, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.cat import Cat -from petstore_api.model.dog import Dog diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi deleted file mode 100644 index 10cc8231ca0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Animal( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - @staticmethod - def discriminator(): - return { - 'className': { - 'Cat': Cat, - 'Dog': Dog, - } - } - - class properties: - className = schemas.StrSchema - color = schemas.StrSchema - __annotations__ = { - "className": className, - "color": color, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", "color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", "color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Animal': - return super().__new__( - cls, - *_args, - className=className, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.cat import Cat -from petstore_api.model.dog import Dog diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py deleted file mode 100644 index 6fda316363c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnimalFarm( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Animal']: - return Animal - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AnimalFarm': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Animal': - return super().__getitem__(i) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi deleted file mode 100644 index 6fda316363c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnimalFarm( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Animal']: - return Animal - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Animal'], typing.List['Animal']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AnimalFarm': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Animal': - return super().__getitem__(i) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py deleted file mode 100644 index 79ef085dbfd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.py +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnyTypeAndFormat( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class uuid( - schemas.UUIDBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'uuid' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'uuid': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class date( - schemas.DateBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'date' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'date': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class date_time( - schemas.DateTimeBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'date_time': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class number( - schemas.DecimalBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'number' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'number': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class binary( - schemas.BinaryBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'binary' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'binary': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class int32( - schemas.Int32Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'int32' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'int32': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class int64( - schemas.Int64Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'int64' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'int64': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class double( - schemas.Float64Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'double' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'double': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class _float( - schemas.Float32Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'float' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> '_float': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "uuid": uuid, - "date": date, - "date-time": date_time, - "number": number, - "binary": binary, - "int32": int32, - "int64": int64, - "double": double, - "float": _float, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date-time"]) -> MetaOapg.properties.date_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["uuid", "date", "date-time", "number", "binary", "int32", "int64", "double", "float", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date-time"]) -> typing.Union[MetaOapg.properties.date_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> typing.Union[MetaOapg.properties.number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> typing.Union[MetaOapg.properties.double, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["uuid", "date", "date-time", "number", "binary", "int32", "int64", "double", "float", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - uuid: typing.Union[MetaOapg.properties.uuid, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - number: typing.Union[MetaOapg.properties.number, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - double: typing.Union[MetaOapg.properties.double, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyTypeAndFormat': - return super().__new__( - cls, - *_args, - uuid=uuid, - date=date, - number=number, - binary=binary, - int32=int32, - int64=int64, - double=double, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi deleted file mode 100644 index 79ef085dbfd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_and_format.pyi +++ /dev/null @@ -1,361 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnyTypeAndFormat( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class uuid( - schemas.UUIDBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'uuid' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'uuid': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class date( - schemas.DateBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'date' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'date': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class date_time( - schemas.DateTimeBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'date_time': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class number( - schemas.DecimalBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'number' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'number': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class binary( - schemas.BinaryBase, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'binary' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'binary': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class int32( - schemas.Int32Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'int32' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'int32': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class int64( - schemas.Int64Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'int64' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'int64': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class double( - schemas.Float64Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'double' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'double': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class _float( - schemas.Float32Base, - schemas.AnyTypeSchema, - ): - - - class MetaOapg: - format = 'float' - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> '_float': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "uuid": uuid, - "date": date, - "date-time": date_time, - "number": number, - "binary": binary, - "int32": int32, - "int64": int64, - "double": double, - "float": _float, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date-time"]) -> MetaOapg.properties.date_time: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["uuid", "date", "date-time", "number", "binary", "int32", "int64", "double", "float", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date-time"]) -> typing.Union[MetaOapg.properties.date_time, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> typing.Union[MetaOapg.properties.number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> typing.Union[MetaOapg.properties.double, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["uuid", "date", "date-time", "number", "binary", "int32", "int64", "double", "float", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - uuid: typing.Union[MetaOapg.properties.uuid, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - number: typing.Union[MetaOapg.properties.number, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - double: typing.Union[MetaOapg.properties.double, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyTypeAndFormat': - return super().__new__( - cls, - *_args, - uuid=uuid, - date=date, - number=number, - binary=binary, - int32=int32, - int64=int64, - double=double, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py deleted file mode 100644 index 032003cf1cb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnyTypeNotString( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - not_schema = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyTypeNotString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi deleted file mode 100644 index 032003cf1cb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/any_type_not_string.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AnyTypeNotString( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - not_schema = schemas.StrSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'AnyTypeNotString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py deleted file mode 100644 index a5ffc8f4b99..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ApiResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - code = schemas.Int32Schema - type = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "type": type, - "message": message, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "type", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "type", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ApiResponse': - return super().__new__( - cls, - *_args, - code=code, - type=type, - message=message, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi deleted file mode 100644 index a5ffc8f4b99..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ApiResponse( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - code = schemas.Int32Schema - type = schemas.StrSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "type": type, - "message": message, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "type", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "type", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ApiResponse': - return super().__new__( - cls, - *_args, - code=code, - type=type, - message=message, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py deleted file mode 100644 index 9b0a5b7d643..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Apple( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "cultivar", - } - - class properties: - - - class cultivar( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[a-zA-Z\s]*$', # noqa: E501 - }] - - - class origin( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[A-Z\s]*$', # noqa: E501 - 'flags': ( - re.IGNORECASE - ) - }] - __annotations__ = { - "cultivar": cultivar, - "origin": origin, - } - - - cultivar: MetaOapg.properties.cultivar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["origin"]) -> MetaOapg.properties.origin: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cultivar", "origin", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["origin"]) -> typing.Union[MetaOapg.properties.origin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cultivar", "origin", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - origin: typing.Union[MetaOapg.properties.origin, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Apple': - return super().__new__( - cls, - *_args, - origin=origin, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi deleted file mode 100644 index 635b0909673..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Apple( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "cultivar", - } - - class properties: - - - class cultivar( - schemas.StrSchema - ): - pass - - - class origin( - schemas.StrSchema - ): - pass - __annotations__ = { - "cultivar": cultivar, - "origin": origin, - } - - - cultivar: MetaOapg.properties.cultivar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["origin"]) -> MetaOapg.properties.origin: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cultivar", "origin", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["origin"]) -> typing.Union[MetaOapg.properties.origin, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cultivar", "origin", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - origin: typing.Union[MetaOapg.properties.origin, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Apple': - return super().__new__( - cls, - *_args, - origin=origin, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py deleted file mode 100644 index d6bbd106ea9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AppleReq( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "cultivar", - } - - class properties: - cultivar = schemas.StrSchema - mealy = schemas.BoolSchema - __annotations__ = { - "cultivar": cultivar, - "mealy": mealy, - } - additional_properties = schemas.NotAnyTypeSchema - - cultivar: MetaOapg.properties.cultivar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mealy"]) -> MetaOapg.properties.mealy: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cultivar"], typing_extensions.Literal["mealy"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mealy"]) -> typing.Union[MetaOapg.properties.mealy, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cultivar"], typing_extensions.Literal["mealy"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cultivar: typing.Union[MetaOapg.properties.cultivar, str, ], - mealy: typing.Union[MetaOapg.properties.mealy, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AppleReq': - return super().__new__( - cls, - *_args, - cultivar=cultivar, - mealy=mealy, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi deleted file mode 100644 index d6bbd106ea9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/apple_req.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class AppleReq( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "cultivar", - } - - class properties: - cultivar = schemas.StrSchema - mealy = schemas.BoolSchema - __annotations__ = { - "cultivar": cultivar, - "mealy": mealy, - } - additional_properties = schemas.NotAnyTypeSchema - - cultivar: MetaOapg.properties.cultivar - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mealy"]) -> MetaOapg.properties.mealy: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["cultivar"], typing_extensions.Literal["mealy"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cultivar"]) -> MetaOapg.properties.cultivar: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mealy"]) -> typing.Union[MetaOapg.properties.mealy, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["cultivar"], typing_extensions.Literal["mealy"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - cultivar: typing.Union[MetaOapg.properties.cultivar, str, ], - mealy: typing.Union[MetaOapg.properties.mealy, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'AppleReq': - return super().__new__( - cls, - *_args, - cultivar=cultivar, - mealy=mealy, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py deleted file mode 100644 index 1c8e2491bd9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayHoldingAnyType( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayHoldingAnyType': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi deleted file mode 100644 index 1c8e2491bd9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_holding_any_type.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayHoldingAnyType( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayHoldingAnyType': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py deleted file mode 100644 index c2cad28411e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfArrayOfNumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class ArrayArrayNumber( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayArrayNumber': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "ArrayArrayNumber": ArrayArrayNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ArrayArrayNumber"]) -> MetaOapg.properties.ArrayArrayNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ArrayArrayNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ArrayArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayArrayNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ArrayArrayNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ArrayArrayNumber: typing.Union[MetaOapg.properties.ArrayArrayNumber, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayOfArrayOfNumberOnly': - return super().__new__( - cls, - *_args, - ArrayArrayNumber=ArrayArrayNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi deleted file mode 100644 index c2cad28411e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.pyi +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfArrayOfNumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class ArrayArrayNumber( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayArrayNumber': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "ArrayArrayNumber": ArrayArrayNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ArrayArrayNumber"]) -> MetaOapg.properties.ArrayArrayNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ArrayArrayNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ArrayArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayArrayNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ArrayArrayNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ArrayArrayNumber: typing.Union[MetaOapg.properties.ArrayArrayNumber, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayOfArrayOfNumberOnly': - return super().__new__( - cls, - *_args, - ArrayArrayNumber=ArrayArrayNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py deleted file mode 100644 index 1be72e32c39..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfEnums( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['StringEnum']: - return StringEnum - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayOfEnums': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'StringEnum': - return super().__getitem__(i) - -from petstore_api.model.string_enum import StringEnum diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi deleted file mode 100644 index 1be72e32c39..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfEnums( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['StringEnum']: - return StringEnum - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['StringEnum'], typing.List['StringEnum']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayOfEnums': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'StringEnum': - return super().__getitem__(i) - -from petstore_api.model.string_enum import StringEnum diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py deleted file mode 100644 index 6a9731e65c9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfNumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class ArrayNumber( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayNumber': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "ArrayNumber": ArrayNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ArrayNumber"]) -> MetaOapg.properties.ArrayNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ArrayNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ArrayNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ArrayNumber: typing.Union[MetaOapg.properties.ArrayNumber, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayOfNumberOnly': - return super().__new__( - cls, - *_args, - ArrayNumber=ArrayNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi deleted file mode 100644 index 6a9731e65c9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.pyi +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayOfNumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class ArrayNumber( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayNumber': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "ArrayNumber": ArrayNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ArrayNumber"]) -> MetaOapg.properties.ArrayNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["ArrayNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ArrayNumber"]) -> typing.Union[MetaOapg.properties.ArrayNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["ArrayNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - ArrayNumber: typing.Union[MetaOapg.properties.ArrayNumber, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayOfNumberOnly': - return super().__new__( - cls, - *_args, - ArrayNumber=ArrayNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py deleted file mode 100644 index e17a16af2ae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class array_of_string( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_of_string': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class array_array_of_integer( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.Int64Schema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_array_of_integer': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class array_array_of_model( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ReadOnlyFirst']: - return ReadOnlyFirst - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ReadOnlyFirst': - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_array_of_model': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "array_of_string": array_of_string, - "array_array_of_integer": array_array_of_integer, - "array_array_of_model": array_array_of_model, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_of_string"]) -> MetaOapg.properties.array_of_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_array_of_integer"]) -> MetaOapg.properties.array_array_of_integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_array_of_model"]) -> MetaOapg.properties.array_array_of_model: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_of_string"]) -> typing.Union[MetaOapg.properties.array_of_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_array_of_integer"]) -> typing.Union[MetaOapg.properties.array_array_of_integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_array_of_model"]) -> typing.Union[MetaOapg.properties.array_array_of_model, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - array_of_string: typing.Union[MetaOapg.properties.array_of_string, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_integer: typing.Union[MetaOapg.properties.array_array_of_integer, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_model: typing.Union[MetaOapg.properties.array_array_of_model, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayTest': - return super().__new__( - cls, - *_args, - array_of_string=array_of_string, - array_array_of_integer=array_array_of_integer, - array_array_of_model=array_array_of_model, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.read_only_first import ReadOnlyFirst diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi deleted file mode 100644 index e17a16af2ae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.pyi +++ /dev/null @@ -1,213 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class array_of_string( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_of_string': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class array_array_of_integer( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.Int64Schema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_array_of_integer': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class array_array_of_model( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['ReadOnlyFirst']: - return ReadOnlyFirst - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['ReadOnlyFirst'], typing.List['ReadOnlyFirst']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'items': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'ReadOnlyFirst': - return super().__getitem__(i) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, list, tuple, ]], typing.List[typing.Union[MetaOapg.items, list, tuple, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_array_of_model': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "array_of_string": array_of_string, - "array_array_of_integer": array_array_of_integer, - "array_array_of_model": array_array_of_model, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_of_string"]) -> MetaOapg.properties.array_of_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_array_of_integer"]) -> MetaOapg.properties.array_array_of_integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_array_of_model"]) -> MetaOapg.properties.array_array_of_model: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_of_string"]) -> typing.Union[MetaOapg.properties.array_of_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_array_of_integer"]) -> typing.Union[MetaOapg.properties.array_array_of_integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_array_of_model"]) -> typing.Union[MetaOapg.properties.array_array_of_model, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["array_of_string", "array_array_of_integer", "array_array_of_model", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - array_of_string: typing.Union[MetaOapg.properties.array_of_string, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_integer: typing.Union[MetaOapg.properties.array_array_of_integer, list, tuple, schemas.Unset] = schemas.unset, - array_array_of_model: typing.Union[MetaOapg.properties.array_array_of_model, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ArrayTest': - return super().__new__( - cls, - *_args, - array_of_string=array_of_string, - array_array_of_integer=array_array_of_integer, - array_array_of_model=array_array_of_model, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.read_only_first import ReadOnlyFirst diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py deleted file mode 100644 index 4871e133597..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayWithValidationsInItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - max_items = 2 - - - class items( - schemas.Int64Schema - ): - - - class MetaOapg: - format = 'int64' - inclusive_maximum = 7 - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayWithValidationsInItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi deleted file mode 100644 index 4adeeacb60b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/array_with_validations_in_items.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ArrayWithValidationsInItems( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class items( - schemas.Int64Schema - ): - pass - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ArrayWithValidationsInItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py deleted file mode 100644 index e98306eb7db..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Banana( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "lengthCm", - } - - class properties: - lengthCm = schemas.NumberSchema - __annotations__ = { - "lengthCm": lengthCm, - } - - lengthCm: MetaOapg.properties.lengthCm - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["lengthCm", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["lengthCm", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Banana': - return super().__new__( - cls, - *_args, - lengthCm=lengthCm, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi deleted file mode 100644 index e98306eb7db..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.pyi +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Banana( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "lengthCm", - } - - class properties: - lengthCm = schemas.NumberSchema - __annotations__ = { - "lengthCm": lengthCm, - } - - lengthCm: MetaOapg.properties.lengthCm - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["lengthCm", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["lengthCm", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Banana': - return super().__new__( - cls, - *_args, - lengthCm=lengthCm, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py deleted file mode 100644 index 0fd0634e237..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BananaReq( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "lengthCm", - } - - class properties: - lengthCm = schemas.NumberSchema - sweet = schemas.BoolSchema - __annotations__ = { - "lengthCm": lengthCm, - "sweet": sweet, - } - additional_properties = schemas.NotAnyTypeSchema - - lengthCm: MetaOapg.properties.lengthCm - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sweet"]) -> MetaOapg.properties.sweet: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["lengthCm"], typing_extensions.Literal["sweet"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sweet"]) -> typing.Union[MetaOapg.properties.sweet, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["lengthCm"], typing_extensions.Literal["sweet"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], - sweet: typing.Union[MetaOapg.properties.sweet, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'BananaReq': - return super().__new__( - cls, - *_args, - lengthCm=lengthCm, - sweet=sweet, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi deleted file mode 100644 index 0fd0634e237..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/banana_req.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BananaReq( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "lengthCm", - } - - class properties: - lengthCm = schemas.NumberSchema - sweet = schemas.BoolSchema - __annotations__ = { - "lengthCm": lengthCm, - "sweet": sweet, - } - additional_properties = schemas.NotAnyTypeSchema - - lengthCm: MetaOapg.properties.lengthCm - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sweet"]) -> MetaOapg.properties.sweet: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["lengthCm"], typing_extensions.Literal["sweet"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lengthCm"]) -> MetaOapg.properties.lengthCm: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sweet"]) -> typing.Union[MetaOapg.properties.sweet, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["lengthCm"], typing_extensions.Literal["sweet"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - lengthCm: typing.Union[MetaOapg.properties.lengthCm, decimal.Decimal, int, float, ], - sweet: typing.Union[MetaOapg.properties.sweet, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'BananaReq': - return super().__new__( - cls, - *_args, - lengthCm=lengthCm, - sweet=sweet, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python/petstore_api/model/bar.py deleted file mode 100644 index d100ad83c56..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/bar.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Bar = schemas.StrSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/bar.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/bar.pyi deleted file mode 100644 index d100ad83c56..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/bar.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Bar = schemas.StrSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py deleted file mode 100644 index 89ea200394d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BasquePig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "BasquePig": "BASQUE_PIG", - } - - @schemas.classproperty - def BASQUE_PIG(cls): - return cls("BasquePig") - __annotations__ = { - "className": className, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BasquePig': - return super().__new__( - cls, - *_args, - className=className, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi deleted file mode 100644 index 9eaea822ed0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.pyi +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BasquePig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def BASQUE_PIG(cls): - return cls("BasquePig") - __annotations__ = { - "className": className, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'BasquePig': - return super().__new__( - cls, - *_args, - className=className, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python/petstore_api/model/boolean.py deleted file mode 100644 index 6f667d4c0b4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Boolean = schemas.BoolSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/boolean.pyi deleted file mode 100644 index 6f667d4c0b4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Boolean = schemas.BoolSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py deleted file mode 100644 index 66d5be71312..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BooleanEnum( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - schemas.BoolClass.TRUE: "TRUE", - } - - @schemas.classproperty - def TRUE(cls): - return cls(True) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.pyi deleted file mode 100644 index 69fe2e6af4e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/boolean_enum.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class BooleanEnum( - schemas.EnumBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def TRUE(cls): - return cls(True) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py deleted file mode 100644 index b8888bde183..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Capitalization( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - smallCamel = schemas.StrSchema - CapitalCamel = schemas.StrSchema - small_Snake = schemas.StrSchema - Capital_Snake = schemas.StrSchema - SCA_ETH_Flow_Points = schemas.StrSchema - ATT_NAME = schemas.StrSchema - __annotations__ = { - "smallCamel": smallCamel, - "CapitalCamel": CapitalCamel, - "small_Snake": small_Snake, - "Capital_Snake": Capital_Snake, - "SCA_ETH_Flow_Points": SCA_ETH_Flow_Points, - "ATT_NAME": ATT_NAME, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["smallCamel"]) -> MetaOapg.properties.smallCamel: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["CapitalCamel"]) -> MetaOapg.properties.CapitalCamel: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["small_Snake"]) -> MetaOapg.properties.small_Snake: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["Capital_Snake"]) -> MetaOapg.properties.Capital_Snake: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["SCA_ETH_Flow_Points"]) -> MetaOapg.properties.SCA_ETH_Flow_Points: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ATT_NAME"]) -> MetaOapg.properties.ATT_NAME: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["smallCamel"]) -> typing.Union[MetaOapg.properties.smallCamel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["CapitalCamel"]) -> typing.Union[MetaOapg.properties.CapitalCamel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["small_Snake"]) -> typing.Union[MetaOapg.properties.small_Snake, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["Capital_Snake"]) -> typing.Union[MetaOapg.properties.Capital_Snake, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["SCA_ETH_Flow_Points"]) -> typing.Union[MetaOapg.properties.SCA_ETH_Flow_Points, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ATT_NAME"]) -> typing.Union[MetaOapg.properties.ATT_NAME, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - smallCamel: typing.Union[MetaOapg.properties.smallCamel, str, schemas.Unset] = schemas.unset, - CapitalCamel: typing.Union[MetaOapg.properties.CapitalCamel, str, schemas.Unset] = schemas.unset, - small_Snake: typing.Union[MetaOapg.properties.small_Snake, str, schemas.Unset] = schemas.unset, - Capital_Snake: typing.Union[MetaOapg.properties.Capital_Snake, str, schemas.Unset] = schemas.unset, - SCA_ETH_Flow_Points: typing.Union[MetaOapg.properties.SCA_ETH_Flow_Points, str, schemas.Unset] = schemas.unset, - ATT_NAME: typing.Union[MetaOapg.properties.ATT_NAME, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Capitalization': - return super().__new__( - cls, - *_args, - smallCamel=smallCamel, - CapitalCamel=CapitalCamel, - small_Snake=small_Snake, - Capital_Snake=Capital_Snake, - SCA_ETH_Flow_Points=SCA_ETH_Flow_Points, - ATT_NAME=ATT_NAME, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi deleted file mode 100644 index b8888bde183..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.pyi +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Capitalization( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - smallCamel = schemas.StrSchema - CapitalCamel = schemas.StrSchema - small_Snake = schemas.StrSchema - Capital_Snake = schemas.StrSchema - SCA_ETH_Flow_Points = schemas.StrSchema - ATT_NAME = schemas.StrSchema - __annotations__ = { - "smallCamel": smallCamel, - "CapitalCamel": CapitalCamel, - "small_Snake": small_Snake, - "Capital_Snake": Capital_Snake, - "SCA_ETH_Flow_Points": SCA_ETH_Flow_Points, - "ATT_NAME": ATT_NAME, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["smallCamel"]) -> MetaOapg.properties.smallCamel: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["CapitalCamel"]) -> MetaOapg.properties.CapitalCamel: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["small_Snake"]) -> MetaOapg.properties.small_Snake: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["Capital_Snake"]) -> MetaOapg.properties.Capital_Snake: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["SCA_ETH_Flow_Points"]) -> MetaOapg.properties.SCA_ETH_Flow_Points: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["ATT_NAME"]) -> MetaOapg.properties.ATT_NAME: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["smallCamel"]) -> typing.Union[MetaOapg.properties.smallCamel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["CapitalCamel"]) -> typing.Union[MetaOapg.properties.CapitalCamel, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["small_Snake"]) -> typing.Union[MetaOapg.properties.small_Snake, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["Capital_Snake"]) -> typing.Union[MetaOapg.properties.Capital_Snake, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["SCA_ETH_Flow_Points"]) -> typing.Union[MetaOapg.properties.SCA_ETH_Flow_Points, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["ATT_NAME"]) -> typing.Union[MetaOapg.properties.ATT_NAME, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["smallCamel", "CapitalCamel", "small_Snake", "Capital_Snake", "SCA_ETH_Flow_Points", "ATT_NAME", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - smallCamel: typing.Union[MetaOapg.properties.smallCamel, str, schemas.Unset] = schemas.unset, - CapitalCamel: typing.Union[MetaOapg.properties.CapitalCamel, str, schemas.Unset] = schemas.unset, - small_Snake: typing.Union[MetaOapg.properties.small_Snake, str, schemas.Unset] = schemas.unset, - Capital_Snake: typing.Union[MetaOapg.properties.Capital_Snake, str, schemas.Unset] = schemas.unset, - SCA_ETH_Flow_Points: typing.Union[MetaOapg.properties.SCA_ETH_Flow_Points, str, schemas.Unset] = schemas.unset, - ATT_NAME: typing.Union[MetaOapg.properties.ATT_NAME, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Capitalization': - return super().__new__( - cls, - *_args, - smallCamel=smallCamel, - CapitalCamel=CapitalCamel, - small_Snake=small_Snake, - Capital_Snake=Capital_Snake, - SCA_ETH_Flow_Points=SCA_ETH_Flow_Points, - ATT_NAME=ATT_NAME, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py deleted file mode 100644 index 0545d82acae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Cat( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - declawed = schemas.BoolSchema - __annotations__ = { - "declawed": declawed, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["declawed"]) -> MetaOapg.properties.declawed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["declawed", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["declawed"]) -> typing.Union[MetaOapg.properties.declawed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["declawed", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - declawed: typing.Union[MetaOapg.properties.declawed, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - declawed=declawed, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Animal, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Cat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi deleted file mode 100644 index 0545d82acae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Cat( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - declawed = schemas.BoolSchema - __annotations__ = { - "declawed": declawed, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["declawed"]) -> MetaOapg.properties.declawed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["declawed", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["declawed"]) -> typing.Union[MetaOapg.properties.declawed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["declawed", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - declawed: typing.Union[MetaOapg.properties.declawed, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - declawed=declawed, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Animal, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Cat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.py b/samples/openapi3/client/petstore/python/petstore_api/model/category.py deleted file mode 100644 index ed26c6fe29b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Category( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "name", - } - - class properties: - name = schemas.StrSchema - id = schemas.Int64Schema - __annotations__ = { - "name": name, - "id": id, - } - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Category': - return super().__new__( - cls, - *_args, - name=name, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi deleted file mode 100644 index ed26c6fe29b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/category.pyi +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Category( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "name", - } - - class properties: - name = schemas.StrSchema - id = schemas.Int64Schema - __annotations__ = { - "name": name, - "id": id, - } - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Category': - return super().__new__( - cls, - *_args, - name=name, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py deleted file mode 100644 index e17837b7a4b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ChildCat( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - __annotations__ = { - "name": name, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - name=name, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ParentPet, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ChildCat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi deleted file mode 100644 index e17837b7a4b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ChildCat( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - __annotations__ = { - "name": name, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - name=name, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ParentPet, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ChildCat': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py deleted file mode 100644 index cf43a386a7b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ClassModel( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing model with "_class" property - """ - - - class MetaOapg: - - class properties: - _class = schemas.StrSchema - __annotations__ = { - "_class": _class, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["_class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["_class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["_class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["_class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _class: typing.Union[MetaOapg.properties._class, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassModel': - return super().__new__( - cls, - *_args, - _class=_class, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi deleted file mode 100644 index cf43a386a7b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.pyi +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ClassModel( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing model with "_class" property - """ - - - class MetaOapg: - - class properties: - _class = schemas.StrSchema - __annotations__ = { - "_class": _class, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["_class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["_class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["_class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["_class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _class: typing.Union[MetaOapg.properties._class, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ClassModel': - return super().__new__( - cls, - *_args, - _class=_class, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.py b/samples/openapi3/client/petstore/python/petstore_api/model/client.py deleted file mode 100644 index fb8e65556d7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Client( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - client = schemas.StrSchema - __annotations__ = { - "client": client, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["client"]) -> MetaOapg.properties.client: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["client", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["client"]) -> typing.Union[MetaOapg.properties.client, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["client", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - client: typing.Union[MetaOapg.properties.client, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Client': - return super().__new__( - cls, - *_args, - client=client, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi deleted file mode 100644 index fb8e65556d7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/client.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Client( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - client = schemas.StrSchema - __annotations__ = { - "client": client, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["client"]) -> MetaOapg.properties.client: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["client", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["client"]) -> typing.Union[MetaOapg.properties.client, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["client", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - client: typing.Union[MetaOapg.properties.client, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Client': - return super().__new__( - cls, - *_args, - client=client, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py deleted file mode 100644 index e24a3e3b0b3..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComplexQuadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class quadrilateralType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "ComplexQuadrilateral": "COMPLEX_QUADRILATERAL", - } - - @schemas.classproperty - def COMPLEX_QUADRILATERAL(cls): - return cls("ComplexQuadrilateral") - __annotations__ = { - "quadrilateralType": quadrilateralType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - QuadrilateralInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComplexQuadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi deleted file mode 100644 index efaa4be332d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComplexQuadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class quadrilateralType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def COMPLEX_QUADRILATERAL(cls): - return cls("ComplexQuadrilateral") - __annotations__ = { - "quadrilateralType": quadrilateralType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - QuadrilateralInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComplexQuadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py deleted file mode 100644 index 85e92968997..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedAnyOfDifferentTypesNoValidations( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.DictSchema - any_of_1 = schemas.DateSchema - any_of_2 = schemas.DateTimeSchema - any_of_3 = schemas.BinarySchema - any_of_4 = schemas.StrSchema - any_of_5 = schemas.StrSchema - any_of_6 = schemas.DictSchema - any_of_7 = schemas.BoolSchema - any_of_8 = schemas.NoneSchema - - - class any_of_9( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'any_of_9': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - any_of_10 = schemas.NumberSchema - any_of_11 = schemas.Float32Schema - any_of_12 = schemas.Float64Schema - any_of_13 = schemas.IntSchema - any_of_14 = schemas.Int32Schema - any_of_15 = schemas.Int64Schema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - cls.any_of_3, - cls.any_of_4, - cls.any_of_5, - cls.any_of_6, - cls.any_of_7, - cls.any_of_8, - cls.any_of_9, - cls.any_of_10, - cls.any_of_11, - cls.any_of_12, - cls.any_of_13, - cls.any_of_14, - cls.any_of_15, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedAnyOfDifferentTypesNoValidations': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi deleted file mode 100644 index 85e92968997..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_any_of_different_types_no_validations.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedAnyOfDifferentTypesNoValidations( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - any_of_0 = schemas.DictSchema - any_of_1 = schemas.DateSchema - any_of_2 = schemas.DateTimeSchema - any_of_3 = schemas.BinarySchema - any_of_4 = schemas.StrSchema - any_of_5 = schemas.StrSchema - any_of_6 = schemas.DictSchema - any_of_7 = schemas.BoolSchema - any_of_8 = schemas.NoneSchema - - - class any_of_9( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'any_of_9': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - any_of_10 = schemas.NumberSchema - any_of_11 = schemas.Float32Schema - any_of_12 = schemas.Float64Schema - any_of_13 = schemas.IntSchema - any_of_14 = schemas.Int32Schema - any_of_15 = schemas.Int64Schema - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.any_of_0, - cls.any_of_1, - cls.any_of_2, - cls.any_of_3, - cls.any_of_4, - cls.any_of_5, - cls.any_of_6, - cls.any_of_7, - cls.any_of_8, - cls.any_of_9, - cls.any_of_10, - cls.any_of_11, - cls.any_of_12, - cls.any_of_13, - cls.any_of_14, - cls.any_of_15, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedAnyOfDifferentTypesNoValidations': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py deleted file mode 100644 index 792eb8c78a2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedArray( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedArray': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi deleted file mode 100644 index 792eb8c78a2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_array.pyi +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedArray( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedArray': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py deleted file mode 100644 index 9252324147d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedBool( - schemas.ComposedBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[bool, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedBool': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi deleted file mode 100644 index 9252324147d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_bool.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedBool( - schemas.ComposedBase, - schemas.BoolSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[bool, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedBool': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py deleted file mode 100644 index 5facdd344b5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedNone( - schemas.ComposedBase, - schemas.NoneSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedNone': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi deleted file mode 100644 index 5facdd344b5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_none.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedNone( - schemas.ComposedBase, - schemas.NoneSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedNone': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py deleted file mode 100644 index b417ee0ee61..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedNumber( - schemas.ComposedBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi deleted file mode 100644 index b417ee0ee61..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_number.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedNumber( - schemas.ComposedBase, - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedNumber': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py deleted file mode 100644 index 474f09ef8e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedObject( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedObject': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi deleted file mode 100644 index 474f09ef8e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_object.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedObject( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedObject': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py deleted file mode 100644 index a49a14190e6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedOneOfDifferentTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - this is a model that allows payloads of type object or number - """ - - - class MetaOapg: - one_of_2 = schemas.NoneSchema - one_of_3 = schemas.DateSchema - - - class one_of_4( - schemas.DictSchema - ): - - - class MetaOapg: - max_properties = 4 - min_properties = 4 - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_4': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_5( - schemas.ListSchema - ): - - - class MetaOapg: - max_items = 4 - min_items = 4 - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'one_of_5': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class one_of_6( - schemas.DateTimeSchema - ): - - - class MetaOapg: - format = 'date-time' - regex=[{ - 'pattern': r'^2020.*', # noqa: E501 - }] - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - NumberWithValidations, - Animal, - cls.one_of_2, - cls.one_of_3, - cls.one_of_4, - cls.one_of_5, - cls.one_of_6, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedOneOfDifferentTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal -from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi deleted file mode 100644 index 3e108524af1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_different_types.pyi +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedOneOfDifferentTypes( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - this is a model that allows payloads of type object or number - """ - - - class MetaOapg: - one_of_2 = schemas.NoneSchema - one_of_3 = schemas.DateSchema - - - class one_of_4( - schemas.DictSchema - ): - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'one_of_4': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class one_of_5( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.AnyTypeSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'one_of_5': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class one_of_6( - schemas.DateTimeSchema - ): - pass - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - NumberWithValidations, - Animal, - cls.one_of_2, - cls.one_of_3, - cls.one_of_4, - cls.one_of_5, - cls.one_of_6, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ComposedOneOfDifferentTypes': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal -from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py deleted file mode 100644 index 23be061de44..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedString( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi deleted file mode 100644 index 23be061de44..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_string.pyi +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ComposedString( - schemas.ComposedBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - all_of_0 = schemas.AnyTypeSchema - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ComposedString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python/petstore_api/model/currency.py deleted file mode 100644 index 8714c9adcc7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/currency.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Currency( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "eur": "EUR", - "usd": "USD", - } - - @schemas.classproperty - def EUR(cls): - return cls("eur") - - @schemas.classproperty - def USD(cls): - return cls("usd") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/currency.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/currency.pyi deleted file mode 100644 index 7706629add2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/currency.pyi +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Currency( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def EUR(cls): - return cls("eur") - - @schemas.classproperty - def USD(cls): - return cls("usd") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py deleted file mode 100644 index b6081d20e23..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DanishPig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "DanishPig": "DANISH_PIG", - } - - @schemas.classproperty - def DANISH_PIG(cls): - return cls("DanishPig") - __annotations__ = { - "className": className, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DanishPig': - return super().__new__( - cls, - *_args, - className=className, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi deleted file mode 100644 index f67a4b5d8cc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.pyi +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DanishPig( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def DANISH_PIG(cls): - return cls("DanishPig") - __annotations__ = { - "className": className, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'DanishPig': - return super().__new__( - cls, - *_args, - className=className, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.py deleted file mode 100644 index 1a616cac271..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -DateTimeTest = schemas.DateTimeSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.pyi deleted file mode 100644 index 1a616cac271..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_test.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -DateTimeTest = schemas.DateTimeSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.py deleted file mode 100644 index a5a7858195a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DateTimeWithValidations( - schemas.DateTimeSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'date-time' - regex=[{ - 'pattern': r'^2020.*', # noqa: E501 - }] diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.pyi deleted file mode 100644 index 2898b619005..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_time_with_validations.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DateTimeWithValidations( - schemas.DateTimeSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.py deleted file mode 100644 index 82d0122a279..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DateWithValidations( - schemas.DateSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'date' - regex=[{ - 'pattern': r'^2020.*', # noqa: E501 - }] diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.pyi deleted file mode 100644 index 52770358d18..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/date_with_validations.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class DateWithValidations( - schemas.DateSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.py deleted file mode 100644 index 8e3b63175a4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -DecimalPayload = schemas.DecimalSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.pyi deleted file mode 100644 index 8e3b63175a4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/decimal_payload.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -DecimalPayload = schemas.DecimalSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py deleted file mode 100644 index aa5ccd90aac..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Dog( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - breed = schemas.StrSchema - __annotations__ = { - "breed": breed, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["breed"]) -> MetaOapg.properties.breed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["breed", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["breed"]) -> typing.Union[MetaOapg.properties.breed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["breed", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - breed: typing.Union[MetaOapg.properties.breed, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - breed=breed, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Animal, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Dog': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi deleted file mode 100644 index aa5ccd90aac..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Dog( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - breed = schemas.StrSchema - __annotations__ = { - "breed": breed, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["breed"]) -> MetaOapg.properties.breed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["breed", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["breed"]) -> typing.Union[MetaOapg.properties.breed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["breed", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - breed: typing.Union[MetaOapg.properties.breed, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - breed=breed, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Animal, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Dog': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py deleted file mode 100644 index b4b8da6a73a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Drawing( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def mainShape() -> typing.Type['Shape']: - return Shape - - @staticmethod - def shapeOrNull() -> typing.Type['ShapeOrNull']: - return ShapeOrNull - - @staticmethod - def nullableShape() -> typing.Type['NullableShape']: - return NullableShape - - - class shapes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Shape']: - return Shape - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'shapes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Shape': - return super().__getitem__(i) - __annotations__ = { - "mainShape": mainShape, - "shapeOrNull": shapeOrNull, - "nullableShape": nullableShape, - "shapes": shapes, - } - - @staticmethod - def additional_properties() -> typing.Type['Fruit']: - return Fruit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mainShape"]) -> 'Shape': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeOrNull"]) -> 'ShapeOrNull': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nullableShape"]) -> 'NullableShape': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapes"]) -> MetaOapg.properties.shapes: ... - - @typing.overload - def __getitem__(self, name: str) -> 'Fruit': ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["mainShape"], typing_extensions.Literal["shapeOrNull"], typing_extensions.Literal["nullableShape"], typing_extensions.Literal["shapes"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mainShape"]) -> typing.Union['Shape', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeOrNull"]) -> typing.Union['ShapeOrNull', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nullableShape"]) -> typing.Union['NullableShape', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapes"]) -> typing.Union[MetaOapg.properties.shapes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union['Fruit', schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["mainShape"], typing_extensions.Literal["shapeOrNull"], typing_extensions.Literal["nullableShape"], typing_extensions.Literal["shapes"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - mainShape: typing.Union['Shape', schemas.Unset] = schemas.unset, - shapeOrNull: typing.Union['ShapeOrNull', schemas.Unset] = schemas.unset, - nullableShape: typing.Union['NullableShape', schemas.Unset] = schemas.unset, - shapes: typing.Union[MetaOapg.properties.shapes, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'Fruit', - ) -> 'Drawing': - return super().__new__( - cls, - *_args, - mainShape=mainShape, - shapeOrNull=shapeOrNull, - nullableShape=nullableShape, - shapes=shapes, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.fruit import Fruit -from petstore_api.model.nullable_shape import NullableShape -from petstore_api.model.shape import Shape -from petstore_api.model.shape_or_null import ShapeOrNull diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi deleted file mode 100644 index b4b8da6a73a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/drawing.pyi +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Drawing( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def mainShape() -> typing.Type['Shape']: - return Shape - - @staticmethod - def shapeOrNull() -> typing.Type['ShapeOrNull']: - return ShapeOrNull - - @staticmethod - def nullableShape() -> typing.Type['NullableShape']: - return NullableShape - - - class shapes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Shape']: - return Shape - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Shape'], typing.List['Shape']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'shapes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Shape': - return super().__getitem__(i) - __annotations__ = { - "mainShape": mainShape, - "shapeOrNull": shapeOrNull, - "nullableShape": nullableShape, - "shapes": shapes, - } - - @staticmethod - def additional_properties() -> typing.Type['Fruit']: - return Fruit - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mainShape"]) -> 'Shape': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeOrNull"]) -> 'ShapeOrNull': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["nullableShape"]) -> 'NullableShape': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapes"]) -> MetaOapg.properties.shapes: ... - - @typing.overload - def __getitem__(self, name: str) -> 'Fruit': ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["mainShape"], typing_extensions.Literal["shapeOrNull"], typing_extensions.Literal["nullableShape"], typing_extensions.Literal["shapes"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["mainShape"]) -> typing.Union['Shape', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeOrNull"]) -> typing.Union['ShapeOrNull', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["nullableShape"]) -> typing.Union['NullableShape', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapes"]) -> typing.Union[MetaOapg.properties.shapes, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union['Fruit', schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["mainShape"], typing_extensions.Literal["shapeOrNull"], typing_extensions.Literal["nullableShape"], typing_extensions.Literal["shapes"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - mainShape: typing.Union['Shape', schemas.Unset] = schemas.unset, - shapeOrNull: typing.Union['ShapeOrNull', schemas.Unset] = schemas.unset, - nullableShape: typing.Union['NullableShape', schemas.Unset] = schemas.unset, - shapes: typing.Union[MetaOapg.properties.shapes, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'Fruit', - ) -> 'Drawing': - return super().__new__( - cls, - *_args, - mainShape=mainShape, - shapeOrNull=shapeOrNull, - nullableShape=nullableShape, - shapes=shapes, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.fruit import Fruit -from petstore_api.model.nullable_shape import NullableShape -from petstore_api.model.shape import Shape -from petstore_api.model.shape_or_null import ShapeOrNull diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py deleted file mode 100644 index 37e81347d54..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py +++ /dev/null @@ -1,150 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumArrays( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class just_symbol( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - ">=": "GREATER_THAN_EQUALS", - "$": "DOLLAR", - } - - @schemas.classproperty - def GREATER_THAN_EQUALS(cls): - return cls(">=") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - - class array_enum( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "fish": "FISH", - "crab": "CRAB", - } - - @schemas.classproperty - def FISH(cls): - return cls("fish") - - @schemas.classproperty - def CRAB(cls): - return cls("crab") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_enum': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "just_symbol": just_symbol, - "array_enum": array_enum, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["just_symbol"]) -> MetaOapg.properties.just_symbol: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_enum"]) -> MetaOapg.properties.array_enum: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["just_symbol", "array_enum", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["just_symbol"]) -> typing.Union[MetaOapg.properties.just_symbol, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_enum"]) -> typing.Union[MetaOapg.properties.array_enum, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["just_symbol", "array_enum", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - just_symbol: typing.Union[MetaOapg.properties.just_symbol, str, schemas.Unset] = schemas.unset, - array_enum: typing.Union[MetaOapg.properties.array_enum, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumArrays': - return super().__new__( - cls, - *_args, - just_symbol=just_symbol, - array_enum=array_enum, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi deleted file mode 100644 index ec85821f0ef..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.pyi +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumArrays( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class just_symbol( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def GREATER_THAN_EQUALS(cls): - return cls(">=") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - - class array_enum( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def FISH(cls): - return cls("fish") - - @schemas.classproperty - def CRAB(cls): - return cls("crab") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_enum': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "just_symbol": just_symbol, - "array_enum": array_enum, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["just_symbol"]) -> MetaOapg.properties.just_symbol: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_enum"]) -> MetaOapg.properties.array_enum: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["just_symbol", "array_enum", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["just_symbol"]) -> typing.Union[MetaOapg.properties.just_symbol, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_enum"]) -> typing.Union[MetaOapg.properties.array_enum, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["just_symbol", "array_enum", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - just_symbol: typing.Union[MetaOapg.properties.just_symbol, str, schemas.Unset] = schemas.unset, - array_enum: typing.Union[MetaOapg.properties.array_enum, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumArrays': - return super().__new__( - cls, - *_args, - just_symbol=just_symbol, - array_enum=array_enum, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py deleted file mode 100644 index 27018e19a6d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumClass( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "_abc": "_ABC", - "-efg": "EFG", - "(xyz)": "XYZ", - "COUNT_1M": "COUNT_1M", - "COUNT_50M": "COUNT_50M", - } - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - - @schemas.classproperty - def COUNT_1M(cls): - return cls("COUNT_1M") - - @schemas.classproperty - def COUNT_50M(cls): - return cls("COUNT_50M") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.pyi deleted file mode 100644 index 7d43347fd84..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.pyi +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumClass( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - - @schemas.classproperty - def COUNT_1M(cls): - return cls("COUNT_1M") - - @schemas.classproperty - def COUNT_50M(cls): - return cls("COUNT_50M") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py deleted file mode 100644 index 26427171455..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py +++ /dev/null @@ -1,276 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "enum_string_required", - } - - class properties: - - - class enum_string_required( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "UPPER": "UPPER", - "lower": "LOWER", - "": "EMPTY", - } - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - @schemas.classproperty - def EMPTY(cls): - return cls("") - - - class enum_string( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "UPPER": "UPPER", - "lower": "LOWER", - "": "EMPTY", - } - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - @schemas.classproperty - def EMPTY(cls): - return cls("") - - - class enum_integer( - schemas.EnumBase, - schemas.Int32Schema - ): - - - class MetaOapg: - format = 'int32' - enum_value_to_name = { - 1: "POSITIVE_1", - -1: "NEGATIVE_1", - } - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def NEGATIVE_1(cls): - return cls(-1) - - - class enum_number( - schemas.EnumBase, - schemas.Float64Schema - ): - - - class MetaOapg: - format = 'double' - enum_value_to_name = { - 1.1: "POSITIVE_1_PT_1", - -1.2: "NEGATIVE_1_PT_2", - } - - @schemas.classproperty - def POSITIVE_1_PT_1(cls): - return cls(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls): - return cls(-1.2) - - @staticmethod - def stringEnum() -> typing.Type['StringEnum']: - return StringEnum - - @staticmethod - def IntegerEnum() -> typing.Type['IntegerEnum']: - return IntegerEnum - - @staticmethod - def StringEnumWithDefaultValue() -> typing.Type['StringEnumWithDefaultValue']: - return StringEnumWithDefaultValue - - @staticmethod - def IntegerEnumWithDefaultValue() -> typing.Type['IntegerEnumWithDefaultValue']: - return IntegerEnumWithDefaultValue - - @staticmethod - def IntegerEnumOneValue() -> typing.Type['IntegerEnumOneValue']: - return IntegerEnumOneValue - __annotations__ = { - "enum_string_required": enum_string_required, - "enum_string": enum_string, - "enum_integer": enum_integer, - "enum_number": enum_number, - "stringEnum": stringEnum, - "IntegerEnum": IntegerEnum, - "StringEnumWithDefaultValue": StringEnumWithDefaultValue, - "IntegerEnumWithDefaultValue": IntegerEnumWithDefaultValue, - "IntegerEnumOneValue": IntegerEnumOneValue, - } - - enum_string_required: MetaOapg.properties.enum_string_required - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_string_required"]) -> MetaOapg.properties.enum_string_required: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_string"]) -> MetaOapg.properties.enum_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_integer"]) -> MetaOapg.properties.enum_integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_number"]) -> MetaOapg.properties.enum_number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stringEnum"]) -> 'StringEnum': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnum"]) -> 'IntegerEnum': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["StringEnumWithDefaultValue"]) -> 'StringEnumWithDefaultValue': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnumWithDefaultValue"]) -> 'IntegerEnumWithDefaultValue': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnumOneValue"]) -> 'IntegerEnumOneValue': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_string_required"]) -> MetaOapg.properties.enum_string_required: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_string"]) -> typing.Union[MetaOapg.properties.enum_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_integer"]) -> typing.Union[MetaOapg.properties.enum_integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_number"]) -> typing.Union[MetaOapg.properties.enum_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stringEnum"]) -> typing.Union['StringEnum', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnum"]) -> typing.Union['IntegerEnum', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["StringEnumWithDefaultValue"]) -> typing.Union['StringEnumWithDefaultValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnumWithDefaultValue"]) -> typing.Union['IntegerEnumWithDefaultValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnumOneValue"]) -> typing.Union['IntegerEnumOneValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - enum_string_required: typing.Union[MetaOapg.properties.enum_string_required, str, ], - enum_string: typing.Union[MetaOapg.properties.enum_string, str, schemas.Unset] = schemas.unset, - enum_integer: typing.Union[MetaOapg.properties.enum_integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - enum_number: typing.Union[MetaOapg.properties.enum_number, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - stringEnum: typing.Union['StringEnum', schemas.Unset] = schemas.unset, - IntegerEnum: typing.Union['IntegerEnum', schemas.Unset] = schemas.unset, - StringEnumWithDefaultValue: typing.Union['StringEnumWithDefaultValue', schemas.Unset] = schemas.unset, - IntegerEnumWithDefaultValue: typing.Union['IntegerEnumWithDefaultValue', schemas.Unset] = schemas.unset, - IntegerEnumOneValue: typing.Union['IntegerEnumOneValue', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumTest': - return super().__new__( - cls, - *_args, - enum_string_required=enum_string_required, - enum_string=enum_string, - enum_integer=enum_integer, - enum_number=enum_number, - stringEnum=stringEnum, - IntegerEnum=IntegerEnum, - StringEnumWithDefaultValue=StringEnumWithDefaultValue, - IntegerEnumWithDefaultValue=IntegerEnumWithDefaultValue, - IntegerEnumOneValue=IntegerEnumOneValue, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.integer_enum import IntegerEnum -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue -from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue -from petstore_api.model.string_enum import StringEnum -from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi deleted file mode 100644 index 7cfb414bb05..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.pyi +++ /dev/null @@ -1,244 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EnumTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "enum_string_required", - } - - class properties: - - - class enum_string_required( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - @schemas.classproperty - def EMPTY(cls): - return cls("") - - - class enum_string( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - @schemas.classproperty - def EMPTY(cls): - return cls("") - - - class enum_integer( - schemas.EnumBase, - schemas.Int32Schema - ): - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def NEGATIVE_1(cls): - return cls(-1) - - - class enum_number( - schemas.EnumBase, - schemas.Float64Schema - ): - - @schemas.classproperty - def POSITIVE_1_PT_1(cls): - return cls(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls): - return cls(-1.2) - - @staticmethod - def stringEnum() -> typing.Type['StringEnum']: - return StringEnum - - @staticmethod - def IntegerEnum() -> typing.Type['IntegerEnum']: - return IntegerEnum - - @staticmethod - def StringEnumWithDefaultValue() -> typing.Type['StringEnumWithDefaultValue']: - return StringEnumWithDefaultValue - - @staticmethod - def IntegerEnumWithDefaultValue() -> typing.Type['IntegerEnumWithDefaultValue']: - return IntegerEnumWithDefaultValue - - @staticmethod - def IntegerEnumOneValue() -> typing.Type['IntegerEnumOneValue']: - return IntegerEnumOneValue - __annotations__ = { - "enum_string_required": enum_string_required, - "enum_string": enum_string, - "enum_integer": enum_integer, - "enum_number": enum_number, - "stringEnum": stringEnum, - "IntegerEnum": IntegerEnum, - "StringEnumWithDefaultValue": StringEnumWithDefaultValue, - "IntegerEnumWithDefaultValue": IntegerEnumWithDefaultValue, - "IntegerEnumOneValue": IntegerEnumOneValue, - } - - enum_string_required: MetaOapg.properties.enum_string_required - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_string_required"]) -> MetaOapg.properties.enum_string_required: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_string"]) -> MetaOapg.properties.enum_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_integer"]) -> MetaOapg.properties.enum_integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_number"]) -> MetaOapg.properties.enum_number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["stringEnum"]) -> 'StringEnum': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnum"]) -> 'IntegerEnum': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["StringEnumWithDefaultValue"]) -> 'StringEnumWithDefaultValue': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnumWithDefaultValue"]) -> 'IntegerEnumWithDefaultValue': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["IntegerEnumOneValue"]) -> 'IntegerEnumOneValue': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_string_required"]) -> MetaOapg.properties.enum_string_required: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_string"]) -> typing.Union[MetaOapg.properties.enum_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_integer"]) -> typing.Union[MetaOapg.properties.enum_integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_number"]) -> typing.Union[MetaOapg.properties.enum_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["stringEnum"]) -> typing.Union['StringEnum', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnum"]) -> typing.Union['IntegerEnum', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["StringEnumWithDefaultValue"]) -> typing.Union['StringEnumWithDefaultValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnumWithDefaultValue"]) -> typing.Union['IntegerEnumWithDefaultValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["IntegerEnumOneValue"]) -> typing.Union['IntegerEnumOneValue', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["enum_string_required", "enum_string", "enum_integer", "enum_number", "stringEnum", "IntegerEnum", "StringEnumWithDefaultValue", "IntegerEnumWithDefaultValue", "IntegerEnumOneValue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - enum_string_required: typing.Union[MetaOapg.properties.enum_string_required, str, ], - enum_string: typing.Union[MetaOapg.properties.enum_string, str, schemas.Unset] = schemas.unset, - enum_integer: typing.Union[MetaOapg.properties.enum_integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - enum_number: typing.Union[MetaOapg.properties.enum_number, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - stringEnum: typing.Union['StringEnum', schemas.Unset] = schemas.unset, - IntegerEnum: typing.Union['IntegerEnum', schemas.Unset] = schemas.unset, - StringEnumWithDefaultValue: typing.Union['StringEnumWithDefaultValue', schemas.Unset] = schemas.unset, - IntegerEnumWithDefaultValue: typing.Union['IntegerEnumWithDefaultValue', schemas.Unset] = schemas.unset, - IntegerEnumOneValue: typing.Union['IntegerEnumOneValue', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EnumTest': - return super().__new__( - cls, - *_args, - enum_string_required=enum_string_required, - enum_string=enum_string, - enum_integer=enum_integer, - enum_number=enum_number, - stringEnum=stringEnum, - IntegerEnum=IntegerEnum, - StringEnumWithDefaultValue=StringEnumWithDefaultValue, - IntegerEnumWithDefaultValue=IntegerEnumWithDefaultValue, - IntegerEnumOneValue=IntegerEnumOneValue, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.integer_enum import IntegerEnum -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue -from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue -from petstore_api.model.string_enum import StringEnum -from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py deleted file mode 100644 index 1d2acc4177d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EquilateralTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "EquilateralTriangle": "EQUILATERAL_TRIANGLE", - } - - @schemas.classproperty - def EQUILATERAL_TRIANGLE(cls): - return cls("EquilateralTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EquilateralTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi deleted file mode 100644 index 120edbf1a27..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class EquilateralTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def EQUILATERAL_TRIANGLE(cls): - return cls("EquilateralTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'EquilateralTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.py b/samples/openapi3/client/petstore/python/petstore_api/model/file.py deleted file mode 100644 index 9a159ffe89e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class File( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Must be named `File` for test. - """ - - - class MetaOapg: - - class properties: - sourceURI = schemas.StrSchema - __annotations__ = { - "sourceURI": sourceURI, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sourceURI"]) -> MetaOapg.properties.sourceURI: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["sourceURI", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sourceURI"]) -> typing.Union[MetaOapg.properties.sourceURI, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sourceURI", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - sourceURI: typing.Union[MetaOapg.properties.sourceURI, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'File': - return super().__new__( - cls, - *_args, - sourceURI=sourceURI, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi deleted file mode 100644 index 9a159ffe89e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file.pyi +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class File( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Must be named `File` for test. - """ - - - class MetaOapg: - - class properties: - sourceURI = schemas.StrSchema - __annotations__ = { - "sourceURI": sourceURI, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["sourceURI"]) -> MetaOapg.properties.sourceURI: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["sourceURI", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["sourceURI"]) -> typing.Union[MetaOapg.properties.sourceURI, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["sourceURI", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - sourceURI: typing.Union[MetaOapg.properties.sourceURI, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'File': - return super().__new__( - cls, - *_args, - sourceURI=sourceURI, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py deleted file mode 100644 index 1a0851a5c4d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FileSchemaTestClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def file() -> typing.Type['File']: - return File - - - class files( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['File']: - return File - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['File'], typing.List['File']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'files': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'File': - return super().__getitem__(i) - __annotations__ = { - "file": file, - "files": files, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> 'File': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["files"]) -> MetaOapg.properties.files: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", "files", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union['File', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["file", "files", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union['File', schemas.Unset] = schemas.unset, - files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FileSchemaTestClass': - return super().__new__( - cls, - *_args, - file=file, - files=files, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.file import File diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi deleted file mode 100644 index 1a0851a5c4d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.pyi +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FileSchemaTestClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def file() -> typing.Type['File']: - return File - - - class files( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['File']: - return File - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['File'], typing.List['File']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'files': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'File': - return super().__getitem__(i) - __annotations__ = { - "file": file, - "files": files, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> 'File': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["files"]) -> MetaOapg.properties.files: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", "files", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union['File', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["file", "files", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union['File', schemas.Unset] = schemas.unset, - files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FileSchemaTestClass': - return super().__new__( - cls, - *_args, - file=file, - files=files, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.file import File diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py deleted file mode 100644 index e77d76a1657..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Foo( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - __annotations__ = { - "bar": bar, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Foo': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi deleted file mode 100644 index e77d76a1657..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Foo( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - __annotations__ = { - "bar": bar, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Foo': - return super().__new__( - cls, - *_args, - bar=bar, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py deleted file mode 100644 index a734b96135d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py +++ /dev/null @@ -1,406 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FormatTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "date", - "number", - "password", - "byte", - } - - class properties: - - - class number( - schemas.NumberSchema - ): - - - class MetaOapg: - inclusive_maximum = 543.2 - inclusive_minimum = 32.1 - multiple_of = 32.5 - byte = schemas.StrSchema - date = schemas.DateSchema - - - class password( - schemas.StrSchema - ): - - - class MetaOapg: - format = 'password' - max_length = 64 - min_length = 10 - - - class integer( - schemas.IntSchema - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 10 - multiple_of = 2 - int32 = schemas.Int32Schema - - - class int32withValidations( - schemas.Int32Schema - ): - - - class MetaOapg: - format = 'int32' - inclusive_maximum = 200 - inclusive_minimum = 20 - int64 = schemas.Int64Schema - - - class _float( - schemas.Float32Schema - ): - - - class MetaOapg: - format = 'float' - inclusive_maximum = 987.6 - inclusive_minimum = 54.3 - float32 = schemas.Float32Schema - - - class double( - schemas.Float64Schema - ): - - - class MetaOapg: - format = 'double' - inclusive_maximum = 123.4 - inclusive_minimum = 67.8 - float64 = schemas.Float64Schema - - - class arrayWithUniqueItems( - schemas.ListSchema - ): - - - class MetaOapg: - unique_items = True - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'arrayWithUniqueItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class string( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'[a-z]', # noqa: E501 - 'flags': ( - re.IGNORECASE - ) - }] - binary = schemas.BinarySchema - dateTime = schemas.DateTimeSchema - uuid = schemas.UUIDSchema - uuidNoExample = schemas.UUIDSchema - - - class pattern_with_digits( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^\d{10}$', # noqa: E501 - }] - - - class pattern_with_digits_and_delimiter( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^image_\d{1,3}$', # noqa: E501 - 'flags': ( - re.IGNORECASE - ) - }] - noneProp = schemas.NoneSchema - __annotations__ = { - "number": number, - "byte": byte, - "date": date, - "password": password, - "integer": integer, - "int32": int32, - "int32withValidations": int32withValidations, - "int64": int64, - "float": _float, - "float32": float32, - "double": double, - "float64": float64, - "arrayWithUniqueItems": arrayWithUniqueItems, - "string": string, - "binary": binary, - "dateTime": dateTime, - "uuid": uuid, - "uuidNoExample": uuidNoExample, - "pattern_with_digits": pattern_with_digits, - "pattern_with_digits_and_delimiter": pattern_with_digits_and_delimiter, - "noneProp": noneProp, - } - - date: MetaOapg.properties.date - number: MetaOapg.properties.number - password: MetaOapg.properties.password - byte: MetaOapg.properties.byte - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer"]) -> MetaOapg.properties.integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32withValidations"]) -> MetaOapg.properties.int32withValidations: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float32"]) -> MetaOapg.properties.float32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float64"]) -> MetaOapg.properties.float64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arrayWithUniqueItems"]) -> MetaOapg.properties.arrayWithUniqueItems: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> MetaOapg.properties.string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuidNoExample"]) -> MetaOapg.properties.uuidNoExample: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_with_digits"]) -> MetaOapg.properties.pattern_with_digits: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_with_digits_and_delimiter"]) -> MetaOapg.properties.pattern_with_digits_and_delimiter: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["noneProp"]) -> MetaOapg.properties.noneProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer"]) -> typing.Union[MetaOapg.properties.integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32withValidations"]) -> typing.Union[MetaOapg.properties.int32withValidations, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float32"]) -> typing.Union[MetaOapg.properties.float32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> typing.Union[MetaOapg.properties.double, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float64"]) -> typing.Union[MetaOapg.properties.float64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arrayWithUniqueItems"]) -> typing.Union[MetaOapg.properties.arrayWithUniqueItems, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union[MetaOapg.properties.string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuidNoExample"]) -> typing.Union[MetaOapg.properties.uuidNoExample, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_with_digits"]) -> typing.Union[MetaOapg.properties.pattern_with_digits, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_with_digits_and_delimiter"]) -> typing.Union[MetaOapg.properties.pattern_with_digits_and_delimiter, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["noneProp"]) -> typing.Union[MetaOapg.properties.noneProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - date: typing.Union[MetaOapg.properties.date, str, date, ], - number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], - password: typing.Union[MetaOapg.properties.password, str, ], - byte: typing.Union[MetaOapg.properties.byte, str, ], - integer: typing.Union[MetaOapg.properties.integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32withValidations: typing.Union[MetaOapg.properties.int32withValidations, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - float32: typing.Union[MetaOapg.properties.float32, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - double: typing.Union[MetaOapg.properties.double, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - float64: typing.Union[MetaOapg.properties.float64, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - arrayWithUniqueItems: typing.Union[MetaOapg.properties.arrayWithUniqueItems, list, tuple, schemas.Unset] = schemas.unset, - string: typing.Union[MetaOapg.properties.string, str, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - uuidNoExample: typing.Union[MetaOapg.properties.uuidNoExample, str, uuid.UUID, schemas.Unset] = schemas.unset, - pattern_with_digits: typing.Union[MetaOapg.properties.pattern_with_digits, str, schemas.Unset] = schemas.unset, - pattern_with_digits_and_delimiter: typing.Union[MetaOapg.properties.pattern_with_digits_and_delimiter, str, schemas.Unset] = schemas.unset, - noneProp: typing.Union[MetaOapg.properties.noneProp, None, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FormatTest': - return super().__new__( - cls, - *_args, - date=date, - number=number, - password=password, - byte=byte, - integer=integer, - int32=int32, - int32withValidations=int32withValidations, - int64=int64, - float32=float32, - double=double, - float64=float64, - arrayWithUniqueItems=arrayWithUniqueItems, - string=string, - binary=binary, - dateTime=dateTime, - uuid=uuid, - uuidNoExample=uuidNoExample, - pattern_with_digits=pattern_with_digits, - pattern_with_digits_and_delimiter=pattern_with_digits_and_delimiter, - noneProp=noneProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi deleted file mode 100644 index 54eb193a6d6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.pyi +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FormatTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "date", - "number", - "password", - "byte", - } - - class properties: - - - class number( - schemas.NumberSchema - ): - pass - byte = schemas.StrSchema - date = schemas.DateSchema - - - class password( - schemas.StrSchema - ): - pass - - - class integer( - schemas.IntSchema - ): - pass - int32 = schemas.Int32Schema - - - class int32withValidations( - schemas.Int32Schema - ): - pass - int64 = schemas.Int64Schema - - - class _float( - schemas.Float32Schema - ): - pass - float32 = schemas.Float32Schema - - - class double( - schemas.Float64Schema - ): - pass - float64 = schemas.Float64Schema - - - class arrayWithUniqueItems( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.NumberSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]], typing.List[typing.Union[MetaOapg.items, decimal.Decimal, int, float, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'arrayWithUniqueItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class string( - schemas.StrSchema - ): - pass - binary = schemas.BinarySchema - dateTime = schemas.DateTimeSchema - uuid = schemas.UUIDSchema - uuidNoExample = schemas.UUIDSchema - - - class pattern_with_digits( - schemas.StrSchema - ): - pass - - - class pattern_with_digits_and_delimiter( - schemas.StrSchema - ): - pass - noneProp = schemas.NoneSchema - __annotations__ = { - "number": number, - "byte": byte, - "date": date, - "password": password, - "integer": integer, - "int32": int32, - "int32withValidations": int32withValidations, - "int64": int64, - "float": _float, - "float32": float32, - "double": double, - "float64": float64, - "arrayWithUniqueItems": arrayWithUniqueItems, - "string": string, - "binary": binary, - "dateTime": dateTime, - "uuid": uuid, - "uuidNoExample": uuidNoExample, - "pattern_with_digits": pattern_with_digits, - "pattern_with_digits_and_delimiter": pattern_with_digits_and_delimiter, - "noneProp": noneProp, - } - - date: MetaOapg.properties.date - number: MetaOapg.properties.number - password: MetaOapg.properties.password - byte: MetaOapg.properties.byte - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer"]) -> MetaOapg.properties.integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32withValidations"]) -> MetaOapg.properties.int32withValidations: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float32"]) -> MetaOapg.properties.float32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float64"]) -> MetaOapg.properties.float64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arrayWithUniqueItems"]) -> MetaOapg.properties.arrayWithUniqueItems: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> MetaOapg.properties.string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuidNoExample"]) -> MetaOapg.properties.uuidNoExample: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_with_digits"]) -> MetaOapg.properties.pattern_with_digits: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_with_digits_and_delimiter"]) -> MetaOapg.properties.pattern_with_digits_and_delimiter: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["noneProp"]) -> MetaOapg.properties.noneProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer"]) -> typing.Union[MetaOapg.properties.integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32withValidations"]) -> typing.Union[MetaOapg.properties.int32withValidations, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float32"]) -> typing.Union[MetaOapg.properties.float32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> typing.Union[MetaOapg.properties.double, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float64"]) -> typing.Union[MetaOapg.properties.float64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arrayWithUniqueItems"]) -> typing.Union[MetaOapg.properties.arrayWithUniqueItems, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union[MetaOapg.properties.string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuidNoExample"]) -> typing.Union[MetaOapg.properties.uuidNoExample, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_with_digits"]) -> typing.Union[MetaOapg.properties.pattern_with_digits, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_with_digits_and_delimiter"]) -> typing.Union[MetaOapg.properties.pattern_with_digits_and_delimiter, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["noneProp"]) -> typing.Union[MetaOapg.properties.noneProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["number", "byte", "date", "password", "integer", "int32", "int32withValidations", "int64", "float", "float32", "double", "float64", "arrayWithUniqueItems", "string", "binary", "dateTime", "uuid", "uuidNoExample", "pattern_with_digits", "pattern_with_digits_and_delimiter", "noneProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - date: typing.Union[MetaOapg.properties.date, str, date, ], - number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], - password: typing.Union[MetaOapg.properties.password, str, ], - byte: typing.Union[MetaOapg.properties.byte, str, ], - integer: typing.Union[MetaOapg.properties.integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32withValidations: typing.Union[MetaOapg.properties.int32withValidations, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - float32: typing.Union[MetaOapg.properties.float32, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - double: typing.Union[MetaOapg.properties.double, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - float64: typing.Union[MetaOapg.properties.float64, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - arrayWithUniqueItems: typing.Union[MetaOapg.properties.arrayWithUniqueItems, list, tuple, schemas.Unset] = schemas.unset, - string: typing.Union[MetaOapg.properties.string, str, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - uuidNoExample: typing.Union[MetaOapg.properties.uuidNoExample, str, uuid.UUID, schemas.Unset] = schemas.unset, - pattern_with_digits: typing.Union[MetaOapg.properties.pattern_with_digits, str, schemas.Unset] = schemas.unset, - pattern_with_digits_and_delimiter: typing.Union[MetaOapg.properties.pattern_with_digits_and_delimiter, str, schemas.Unset] = schemas.unset, - noneProp: typing.Union[MetaOapg.properties.noneProp, None, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FormatTest': - return super().__new__( - cls, - *_args, - date=date, - number=number, - password=password, - byte=byte, - integer=integer, - int32=int32, - int32withValidations=int32withValidations, - int64=int64, - float32=float32, - double=double, - float64=float64, - arrayWithUniqueItems=arrayWithUniqueItems, - string=string, - binary=binary, - dateTime=dateTime, - uuid=uuid, - uuidNoExample=uuidNoExample, - pattern_with_digits=pattern_with_digits, - pattern_with_digits_and_delimiter=pattern_with_digits_and_delimiter, - noneProp=noneProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py deleted file mode 100644 index 637d16a5eab..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FromSchema( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - data = schemas.StrSchema - id = schemas.IntSchema - __annotations__ = { - "data": data, - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FromSchema': - return super().__new__( - cls, - *_args, - data=data, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi deleted file mode 100644 index 637d16a5eab..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/from_schema.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FromSchema( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - data = schemas.StrSchema - id = schemas.IntSchema - __annotations__ = { - "data": data, - "id": id, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["data"]) -> MetaOapg.properties.data: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["data"]) -> typing.Union[MetaOapg.properties.data, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["data", "id", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - data: typing.Union[MetaOapg.properties.data, str, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FromSchema': - return super().__new__( - cls, - *_args, - data=data, - id=id, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py deleted file mode 100644 index 892ccdbf6e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Fruit( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - color = schemas.StrSchema - __annotations__ = { - "color": color, - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Apple, - Banana, - ] - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Fruit': - return super().__new__( - cls, - *_args, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple import Apple -from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi deleted file mode 100644 index 892ccdbf6e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.pyi +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Fruit( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - color = schemas.StrSchema - __annotations__ = { - "color": color, - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Apple, - Banana, - ] - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Fruit': - return super().__new__( - cls, - *_args, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple import Apple -from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py deleted file mode 100644 index d95300a1cef..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FruitReq( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - AppleReq, - BananaReq, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FruitReq': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple_req import AppleReq -from petstore_api.model.banana_req import BananaReq diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi deleted file mode 100644 index d95300a1cef..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.pyi +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class FruitReq( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - AppleReq, - BananaReq, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'FruitReq': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple_req import AppleReq -from petstore_api.model.banana_req import BananaReq diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py deleted file mode 100644 index 07ebabbc3ff..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class GmFruit( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - color = schemas.StrSchema - __annotations__ = { - "color": color, - } - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Apple, - Banana, - ] - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GmFruit': - return super().__new__( - cls, - *_args, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple import Apple -from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi deleted file mode 100644 index 07ebabbc3ff..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.pyi +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class GmFruit( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - color = schemas.StrSchema - __annotations__ = { - "color": color, - } - - @classmethod - @functools.lru_cache() - def any_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Apple, - Banana, - ] - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["color"]) -> MetaOapg.properties.color: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["color"]) -> typing.Union[MetaOapg.properties.color, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["color", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - color: typing.Union[MetaOapg.properties.color, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GmFruit': - return super().__new__( - cls, - *_args, - color=color, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.apple import Apple -from petstore_api.model.banana import Banana diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py deleted file mode 100644 index 08f64735dc1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class GrandparentAnimal( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pet_type", - } - - @staticmethod - def discriminator(): - return { - 'pet_type': { - 'ChildCat': ChildCat, - 'ParentPet': ParentPet, - } - } - - class properties: - pet_type = schemas.StrSchema - __annotations__ = { - "pet_type": pet_type, - } - - pet_type: MetaOapg.properties.pet_type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pet_type"]) -> MetaOapg.properties.pet_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pet_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pet_type"]) -> MetaOapg.properties.pet_type: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pet_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pet_type: typing.Union[MetaOapg.properties.pet_type, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GrandparentAnimal': - return super().__new__( - cls, - *_args, - pet_type=pet_type, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.child_cat import ChildCat -from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi deleted file mode 100644 index 08f64735dc1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.pyi +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class GrandparentAnimal( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "pet_type", - } - - @staticmethod - def discriminator(): - return { - 'pet_type': { - 'ChildCat': ChildCat, - 'ParentPet': ParentPet, - } - } - - class properties: - pet_type = schemas.StrSchema - __annotations__ = { - "pet_type": pet_type, - } - - pet_type: MetaOapg.properties.pet_type - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pet_type"]) -> MetaOapg.properties.pet_type: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["pet_type", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pet_type"]) -> MetaOapg.properties.pet_type: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["pet_type", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - pet_type: typing.Union[MetaOapg.properties.pet_type, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'GrandparentAnimal': - return super().__new__( - cls, - *_args, - pet_type=pet_type, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.child_cat import ChildCat -from petstore_api.model.parent_pet import ParentPet diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py deleted file mode 100644 index 809b27defd5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class HasOnlyReadOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - foo = schemas.StrSchema - __annotations__ = { - "bar": bar, - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HasOnlyReadOnly': - return super().__new__( - cls, - *_args, - bar=bar, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi deleted file mode 100644 index 809b27defd5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class HasOnlyReadOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - foo = schemas.StrSchema - __annotations__ = { - "bar": bar, - "foo": foo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["foo"]) -> MetaOapg.properties.foo: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["foo"]) -> typing.Union[MetaOapg.properties.foo, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "foo", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - foo: typing.Union[MetaOapg.properties.foo, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HasOnlyReadOnly': - return super().__new__( - cls, - *_args, - bar=bar, - foo=foo, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py deleted file mode 100644 index be6712279e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class HealthCheckResult( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - """ - - - class MetaOapg: - - class properties: - - - class NullableMessage( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NullableMessage': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "NullableMessage": NullableMessage, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["NullableMessage"]) -> MetaOapg.properties.NullableMessage: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["NullableMessage", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["NullableMessage"]) -> typing.Union[MetaOapg.properties.NullableMessage, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["NullableMessage", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - NullableMessage: typing.Union[MetaOapg.properties.NullableMessage, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HealthCheckResult': - return super().__new__( - cls, - *_args, - NullableMessage=NullableMessage, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi deleted file mode 100644 index be6712279e5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.pyi +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class HealthCheckResult( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - """ - - - class MetaOapg: - - class properties: - - - class NullableMessage( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NullableMessage': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - __annotations__ = { - "NullableMessage": NullableMessage, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["NullableMessage"]) -> MetaOapg.properties.NullableMessage: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["NullableMessage", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["NullableMessage"]) -> typing.Union[MetaOapg.properties.NullableMessage, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["NullableMessage", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - NullableMessage: typing.Union[MetaOapg.properties.NullableMessage, None, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'HealthCheckResult': - return super().__new__( - cls, - *_args, - NullableMessage=NullableMessage, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py deleted file mode 100644 index 18cd8df6434..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnum( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 0: "POSITIVE_0", - 1: "POSITIVE_1", - 2: "POSITIVE_2", - } - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.pyi deleted file mode 100644 index 5f88412337f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnum( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.py deleted file mode 100644 index 615680bd126..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumBig( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 10: "POSITIVE_10", - 11: "POSITIVE_11", - 12: "POSITIVE_12", - } - - @schemas.classproperty - def POSITIVE_10(cls): - return cls(10) - - @schemas.classproperty - def POSITIVE_11(cls): - return cls(11) - - @schemas.classproperty - def POSITIVE_12(cls): - return cls(12) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.pyi deleted file mode 100644 index 939443fcaaa..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_big.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumBig( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_10(cls): - return cls(10) - - @schemas.classproperty - def POSITIVE_11(cls): - return cls(11) - - @schemas.classproperty - def POSITIVE_12(cls): - return cls(12) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py deleted file mode 100644 index 6ab7f2f2130..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumOneValue( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 0: "POSITIVE_0", - } - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.pyi deleted file mode 100644 index 1e911e5f24b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.pyi +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumOneValue( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py deleted file mode 100644 index 87b44b36f16..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumWithDefaultValue( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - 0: "POSITIVE_0", - 1: "POSITIVE_1", - 2: "POSITIVE_2", - } - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.pyi deleted file mode 100644 index 9ecbb8d1630..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerEnumWithDefaultValue( - schemas.EnumBase, - schemas.IntSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def POSITIVE_0(cls): - return cls(0) - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def POSITIVE_2(cls): - return cls(2) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.py deleted file mode 100644 index ac4541fad1f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerMax10( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'int64' - inclusive_maximum = 10 diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.pyi deleted file mode 100644 index 7e0c4ee3373..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_max10.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerMax10( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.py deleted file mode 100644 index 8424c1012a0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerMin15( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'int64' - inclusive_minimum = 15 diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.pyi deleted file mode 100644 index 73d4df6c230..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_min15.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IntegerMin15( - schemas.Int64Schema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py deleted file mode 100644 index 5ca02f0fa56..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IsoscelesTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "IsoscelesTriangle": "ISOSCELES_TRIANGLE", - } - - @schemas.classproperty - def ISOSCELES_TRIANGLE(cls): - return cls("IsoscelesTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'IsoscelesTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi deleted file mode 100644 index 1ae4ed92dfe..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class IsoscelesTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ISOSCELES_TRIANGLE(cls): - return cls("IsoscelesTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'IsoscelesTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py deleted file mode 100644 index bcbf6521ca6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequest( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class items( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - JSONPatchRequestAddReplaceTest, - JSONPatchRequestRemove, - JSONPatchRequestMoveCopy, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequest': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - -from petstore_api.model.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest -from petstore_api.model.json_patch_request_move_copy import JSONPatchRequestMoveCopy -from petstore_api.model.json_patch_request_remove import JSONPatchRequestRemove diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi deleted file mode 100644 index bcbf6521ca6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request.pyi +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequest( - schemas.ListSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class items( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - JSONPatchRequestAddReplaceTest, - JSONPatchRequestRemove, - JSONPatchRequestMoveCopy, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequest': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - -from petstore_api.model.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest -from petstore_api.model.json_patch_request_move_copy import JSONPatchRequestMoveCopy -from petstore_api.model.json_patch_request_remove import JSONPatchRequestRemove diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py deleted file mode 100644 index 7198cce9031..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.py +++ /dev/null @@ -1,123 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestAddReplaceTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - "value", - } - - class properties: - path = schemas.StrSchema - value = schemas.AnyTypeSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "add": "ADD", - "replace": "REPLACE", - "test": "TEST", - } - - @schemas.classproperty - def ADD(cls): - return cls("add") - - @schemas.classproperty - def REPLACE(cls): - return cls("replace") - - @schemas.classproperty - def TEST(cls): - return cls("test") - __annotations__ = { - "path": path, - "value": value, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - value: MetaOapg.properties.value - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["value"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["value"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - value: typing.Union[MetaOapg.properties.value, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestAddReplaceTest': - return super().__new__( - cls, - *_args, - op=op, - path=path, - value=value, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi deleted file mode 100644 index 682f79942af..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_add_replace_test.pyi +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestAddReplaceTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - "value", - } - - class properties: - path = schemas.StrSchema - value = schemas.AnyTypeSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ADD(cls): - return cls("add") - - @schemas.classproperty - def REPLACE(cls): - return cls("replace") - - @schemas.classproperty - def TEST(cls): - return cls("test") - __annotations__ = { - "path": path, - "value": value, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - value: MetaOapg.properties.value - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["value"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["value"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - value: typing.Union[MetaOapg.properties.value, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestAddReplaceTest': - return super().__new__( - cls, - *_args, - op=op, - path=path, - value=value, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py deleted file mode 100644 index 0a4e78afa7a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestMoveCopy( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - "from", - } - - class properties: - _from = schemas.StrSchema - path = schemas.StrSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "move": "MOVE", - "copy": "COPY", - } - - @schemas.classproperty - def MOVE(cls): - return cls("move") - - @schemas.classproperty - def COPY(cls): - return cls("copy") - __annotations__ = { - "from": _from, - "path": path, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["from"]) -> MetaOapg.properties._from: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["from"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> MetaOapg.properties._from: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["from"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestMoveCopy': - return super().__new__( - cls, - *_args, - op=op, - path=path, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi deleted file mode 100644 index ac1b968a3da..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_move_copy.pyi +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestMoveCopy( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - "from", - } - - class properties: - _from = schemas.StrSchema - path = schemas.StrSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def MOVE(cls): - return cls("move") - - @schemas.classproperty - def COPY(cls): - return cls("copy") - __annotations__ = { - "from": _from, - "path": path, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["from"]) -> MetaOapg.properties._from: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["from"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> MetaOapg.properties._from: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], typing_extensions.Literal["from"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestMoveCopy': - return super().__new__( - cls, - *_args, - op=op, - path=path, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py deleted file mode 100644 index f4d5490a996..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestRemove( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - } - - class properties: - path = schemas.StrSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "remove": "REMOVE", - } - - @schemas.classproperty - def REMOVE(cls): - return cls("remove") - __annotations__ = { - "path": path, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestRemove': - return super().__new__( - cls, - *_args, - op=op, - path=path, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi deleted file mode 100644 index 306cb088dae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/json_patch_request_remove.pyi +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class JSONPatchRequestRemove( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "op", - "path", - } - - class properties: - path = schemas.StrSchema - - - class op( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def REMOVE(cls): - return cls("remove") - __annotations__ = { - "path": path, - "op": op, - } - additional_properties = schemas.NotAnyTypeSchema - - op: MetaOapg.properties.op - path: MetaOapg.properties.path - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["op"]) -> MetaOapg.properties.op: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["path"]) -> MetaOapg.properties.path: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["op"], typing_extensions.Literal["path"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - op: typing.Union[MetaOapg.properties.op, str, ], - path: typing.Union[MetaOapg.properties.path, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'JSONPatchRequestRemove': - return super().__new__( - cls, - *_args, - op=op, - path=path, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py deleted file mode 100644 index d69264dd94f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Mammal( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'className': { - 'Pig': Pig, - 'whale': Whale, - 'zebra': Zebra, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Whale, - Zebra, - Pig, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Mammal': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.pig import Pig -from petstore_api.model.whale import Whale -from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi deleted file mode 100644 index d69264dd94f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.pyi +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Mammal( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'className': { - 'Pig': Pig, - 'whale': Whale, - 'zebra': Zebra, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Whale, - Zebra, - Pig, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Mammal': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.pig import Pig -from petstore_api.model.whale import Whale -from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py deleted file mode 100644 index 18f0a81e871..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py +++ /dev/null @@ -1,245 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class MapTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class map_map_of_string( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'map_map_of_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class map_of_enum_string( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "UPPER": "UPPER", - "lower": "LOWER", - } - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_of_enum_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class direct_map( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'direct_map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @staticmethod - def indirect_map() -> typing.Type['StringBooleanMap']: - return StringBooleanMap - __annotations__ = { - "map_map_of_string": map_map_of_string, - "map_of_enum_string": map_of_enum_string, - "direct_map": direct_map, - "indirect_map": indirect_map, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_map_of_string"]) -> MetaOapg.properties.map_map_of_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_of_enum_string"]) -> MetaOapg.properties.map_of_enum_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["direct_map"]) -> MetaOapg.properties.direct_map: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["indirect_map"]) -> 'StringBooleanMap': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_map_of_string"]) -> typing.Union[MetaOapg.properties.map_map_of_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_of_enum_string"]) -> typing.Union[MetaOapg.properties.map_of_enum_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["direct_map"]) -> typing.Union[MetaOapg.properties.direct_map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["indirect_map"]) -> typing.Union['StringBooleanMap', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - map_map_of_string: typing.Union[MetaOapg.properties.map_map_of_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_enum_string: typing.Union[MetaOapg.properties.map_of_enum_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - direct_map: typing.Union[MetaOapg.properties.direct_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - indirect_map: typing.Union['StringBooleanMap', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapTest': - return super().__new__( - cls, - *_args, - map_map_of_string=map_map_of_string, - map_of_enum_string=map_of_enum_string, - direct_map=direct_map, - indirect_map=indirect_map, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.string_boolean_map import StringBooleanMap diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi deleted file mode 100644 index 027c7831cc3..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.pyi +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class MapTest( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class map_map_of_string( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'map_map_of_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class map_of_enum_string( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def UPPER(cls): - return cls("UPPER") - - @schemas.classproperty - def LOWER(cls): - return cls("lower") - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'map_of_enum_string': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class direct_map( - schemas.DictSchema - ): - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'direct_map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @staticmethod - def indirect_map() -> typing.Type['StringBooleanMap']: - return StringBooleanMap - __annotations__ = { - "map_map_of_string": map_map_of_string, - "map_of_enum_string": map_of_enum_string, - "direct_map": direct_map, - "indirect_map": indirect_map, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_map_of_string"]) -> MetaOapg.properties.map_map_of_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map_of_enum_string"]) -> MetaOapg.properties.map_of_enum_string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["direct_map"]) -> MetaOapg.properties.direct_map: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["indirect_map"]) -> 'StringBooleanMap': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_map_of_string"]) -> typing.Union[MetaOapg.properties.map_map_of_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map_of_enum_string"]) -> typing.Union[MetaOapg.properties.map_of_enum_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["direct_map"]) -> typing.Union[MetaOapg.properties.direct_map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["indirect_map"]) -> typing.Union['StringBooleanMap', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["map_map_of_string", "map_of_enum_string", "direct_map", "indirect_map", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - map_map_of_string: typing.Union[MetaOapg.properties.map_map_of_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - map_of_enum_string: typing.Union[MetaOapg.properties.map_of_enum_string, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - direct_map: typing.Union[MetaOapg.properties.direct_map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - indirect_map: typing.Union['StringBooleanMap', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapTest': - return super().__new__( - cls, - *_args, - map_map_of_string=map_map_of_string, - map_of_enum_string=map_of_enum_string, - direct_map=direct_map, - indirect_map=indirect_map, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.string_boolean_map import StringBooleanMap diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py deleted file mode 100644 index 9096dc77828..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class MixedPropertiesAndAdditionalPropertiesClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - uuid = schemas.UUIDSchema - dateTime = schemas.DateTimeSchema - - - class map( - schemas.DictSchema - ): - - - class MetaOapg: - - @staticmethod - def additional_properties() -> typing.Type['Animal']: - return Animal - - def __getitem__(self, name: typing.Union[str, ]) -> 'Animal': - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> 'Animal': - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'Animal', - ) -> 'map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "uuid": uuid, - "dateTime": dateTime, - "map": map, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map"]) -> MetaOapg.properties.map: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["uuid", "dateTime", "map", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map"]) -> typing.Union[MetaOapg.properties.map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["uuid", "dateTime", "map", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - map: typing.Union[MetaOapg.properties.map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MixedPropertiesAndAdditionalPropertiesClass': - return super().__new__( - cls, - *_args, - uuid=uuid, - dateTime=dateTime, - map=map, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi deleted file mode 100644 index 9096dc77828..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.pyi +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class MixedPropertiesAndAdditionalPropertiesClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - uuid = schemas.UUIDSchema - dateTime = schemas.DateTimeSchema - - - class map( - schemas.DictSchema - ): - - - class MetaOapg: - - @staticmethod - def additional_properties() -> typing.Type['Animal']: - return Animal - - def __getitem__(self, name: typing.Union[str, ]) -> 'Animal': - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> 'Animal': - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: 'Animal', - ) -> 'map': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "uuid": uuid, - "dateTime": dateTime, - "map": map, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["uuid"]) -> MetaOapg.properties.uuid: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["map"]) -> MetaOapg.properties.map: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["uuid", "dateTime", "map", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["uuid"]) -> typing.Union[MetaOapg.properties.uuid, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["map"]) -> typing.Union[MetaOapg.properties.map, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["uuid", "dateTime", "map", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - uuid: typing.Union[MetaOapg.properties.uuid, str, uuid.UUID, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - map: typing.Union[MetaOapg.properties.map, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MixedPropertiesAndAdditionalPropertiesClass': - return super().__new__( - cls, - *_args, - uuid=uuid, - dateTime=dateTime, - map=map, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.animal import Animal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py deleted file mode 100644 index ba582159e82..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Model200Response( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python, starts with a number - """ - - - class MetaOapg: - - class properties: - name = schemas.Int32Schema - _class = schemas.StrSchema - __annotations__ = { - "name": name, - "class": _class, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Model200Response': - return super().__new__( - cls, - *_args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi deleted file mode 100644 index ba582159e82..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Model200Response( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python, starts with a number - """ - - - class MetaOapg: - - class properties: - name = schemas.Int32Schema - _class = schemas.StrSchema - __annotations__ = { - "name": name, - "class": _class, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["class"]) -> MetaOapg.properties._class: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "class", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["class"]) -> typing.Union[MetaOapg.properties._class, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "class", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Model200Response': - return super().__new__( - cls, - *_args, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py deleted file mode 100644 index be6cb94a5e6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ModelReturn( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing reserved words - """ - - - class MetaOapg: - - class properties: - _return = schemas.Int32Schema - __annotations__ = { - "return": _return, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["return", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["return", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelReturn': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi deleted file mode 100644 index be6cb94a5e6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.pyi +++ /dev/null @@ -1,79 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ModelReturn( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing reserved words - """ - - - class MetaOapg: - - class properties: - _return = schemas.Int32Schema - __annotations__ = { - "return": _return, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["return"]) -> MetaOapg.properties._return: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["return", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["return"]) -> typing.Union[MetaOapg.properties._return, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["return", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ModelReturn': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/money.py b/samples/openapi3/client/petstore/python/petstore_api/model/money.py deleted file mode 100644 index 16d38505949..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/money.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Money( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "amount", - "currency", - } - - class properties: - amount = schemas.DecimalSchema - - @staticmethod - def currency() -> typing.Type['Currency']: - return Currency - __annotations__ = { - "amount": amount, - "currency": currency, - } - - amount: MetaOapg.properties.amount - currency: 'Currency' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["currency"]) -> 'Currency': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["amount", "currency", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["currency"]) -> 'Currency': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["amount", "currency", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - amount: typing.Union[MetaOapg.properties.amount, str, ], - currency: 'Currency', - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Money': - return super().__new__( - cls, - *_args, - amount=amount, - currency=currency, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.currency import Currency diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi deleted file mode 100644 index 16d38505949..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/money.pyi +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Money( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "amount", - "currency", - } - - class properties: - amount = schemas.DecimalSchema - - @staticmethod - def currency() -> typing.Type['Currency']: - return Currency - __annotations__ = { - "amount": amount, - "currency": currency, - } - - amount: MetaOapg.properties.amount - currency: 'Currency' - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["currency"]) -> 'Currency': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["amount", "currency", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["amount"]) -> MetaOapg.properties.amount: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["currency"]) -> 'Currency': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["amount", "currency", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - amount: typing.Union[MetaOapg.properties.amount, str, ], - currency: 'Currency', - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Money': - return super().__new__( - cls, - *_args, - amount=amount, - currency=currency, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.currency import Currency diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.py b/samples/openapi3/client/petstore/python/petstore_api/model/name.py deleted file mode 100644 index 94e37c1dabf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Name( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing model name same as property name - """ - - - class MetaOapg: - required = { - "name", - } - - class properties: - name = schemas.Int32Schema - snake_case = schemas.Int32Schema - _property = schemas.StrSchema - __annotations__ = { - "name": name, - "snake_case": snake_case, - "property": _property, - } - - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["snake_case"]) -> MetaOapg.properties.snake_case: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["property"]) -> MetaOapg.properties._property: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "snake_case", "property", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["snake_case"]) -> typing.Union[MetaOapg.properties.snake_case, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["property"]) -> typing.Union[MetaOapg.properties._property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "snake_case", "property", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, ], - snake_case: typing.Union[MetaOapg.properties.snake_case, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Name': - return super().__new__( - cls, - *_args, - name=name, - snake_case=snake_case, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi deleted file mode 100644 index 94e37c1dabf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/name.pyi +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Name( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Model for testing model name same as property name - """ - - - class MetaOapg: - required = { - "name", - } - - class properties: - name = schemas.Int32Schema - snake_case = schemas.Int32Schema - _property = schemas.StrSchema - __annotations__ = { - "name": name, - "snake_case": snake_case, - "property": _property, - } - - - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["snake_case"]) -> MetaOapg.properties.snake_case: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["property"]) -> MetaOapg.properties._property: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "snake_case", "property", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["snake_case"]) -> typing.Union[MetaOapg.properties.snake_case, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["property"]) -> typing.Union[MetaOapg.properties._property, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "snake_case", "property", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, decimal.Decimal, int, ], - snake_case: typing.Union[MetaOapg.properties.snake_case, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Name': - return super().__new__( - cls, - *_args, - name=name, - snake_case=snake_case, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py deleted file mode 100644 index 4eb3cf9bbb7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NoAdditionalProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "id", - } - - class properties: - id = schemas.Int64Schema - petId = schemas.Int64Schema - __annotations__ = { - "id": id, - "petId": petId, - } - additional_properties = schemas.NotAnyTypeSchema - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["petId"]) -> MetaOapg.properties.petId: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["petId"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["petId"]) -> typing.Union[MetaOapg.properties.petId, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["petId"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ], - petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NoAdditionalProperties': - return super().__new__( - cls, - *_args, - id=id, - petId=petId, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi deleted file mode 100644 index 4eb3cf9bbb7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/no_additional_properties.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NoAdditionalProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "id", - } - - class properties: - id = schemas.Int64Schema - petId = schemas.Int64Schema - __annotations__ = { - "id": id, - "petId": petId, - } - additional_properties = schemas.NotAnyTypeSchema - - id: MetaOapg.properties.id - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["petId"]) -> MetaOapg.properties.petId: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["petId"], ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["petId"]) -> typing.Union[MetaOapg.properties.petId, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id"], typing_extensions.Literal["petId"], ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, ], - petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NoAdditionalProperties': - return super().__new__( - cls, - *_args, - id=id, - petId=petId, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py deleted file mode 100644 index 4bc17e7e05c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py +++ /dev/null @@ -1,576 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class integer_prop( - schemas.IntBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'integer_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class number_prop( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'number_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class boolean_prop( - schemas.BoolBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneBoolMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, bool, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'boolean_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class string_prop( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'string_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class date_prop( - schemas.DateBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date' - - - def __new__( - cls, - *_args: typing.Union[None, str, date, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'date_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class datetime_prop( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'datetime_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_nullable_prop( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.DictSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_and_items_nullable_prop( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - - - class items( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_and_items_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_items_nullable( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_items_nullable': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class object_nullable_prop( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - class MetaOapg: - additional_properties = schemas.DictSchema - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'object_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class object_and_items_nullable_prop( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'object_and_items_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class object_items_nullable( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'object_items_nullable': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "integer_prop": integer_prop, - "number_prop": number_prop, - "boolean_prop": boolean_prop, - "string_prop": string_prop, - "date_prop": date_prop, - "datetime_prop": datetime_prop, - "array_nullable_prop": array_nullable_prop, - "array_and_items_nullable_prop": array_and_items_nullable_prop, - "array_items_nullable": array_items_nullable, - "object_nullable_prop": object_nullable_prop, - "object_and_items_nullable_prop": object_and_items_nullable_prop, - "object_items_nullable": object_items_nullable, - } - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer_prop"]) -> MetaOapg.properties.integer_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number_prop"]) -> MetaOapg.properties.number_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["boolean_prop"]) -> MetaOapg.properties.boolean_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string_prop"]) -> MetaOapg.properties.string_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date_prop"]) -> MetaOapg.properties.date_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["datetime_prop"]) -> MetaOapg.properties.datetime_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_nullable_prop"]) -> MetaOapg.properties.array_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_and_items_nullable_prop"]) -> MetaOapg.properties.array_and_items_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_items_nullable"]) -> MetaOapg.properties.array_items_nullable: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_nullable_prop"]) -> MetaOapg.properties.object_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_and_items_nullable_prop"]) -> MetaOapg.properties.object_and_items_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_items_nullable"]) -> MetaOapg.properties.object_items_nullable: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["integer_prop"], typing_extensions.Literal["number_prop"], typing_extensions.Literal["boolean_prop"], typing_extensions.Literal["string_prop"], typing_extensions.Literal["date_prop"], typing_extensions.Literal["datetime_prop"], typing_extensions.Literal["array_nullable_prop"], typing_extensions.Literal["array_and_items_nullable_prop"], typing_extensions.Literal["array_items_nullable"], typing_extensions.Literal["object_nullable_prop"], typing_extensions.Literal["object_and_items_nullable_prop"], typing_extensions.Literal["object_items_nullable"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer_prop"]) -> typing.Union[MetaOapg.properties.integer_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number_prop"]) -> typing.Union[MetaOapg.properties.number_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["boolean_prop"]) -> typing.Union[MetaOapg.properties.boolean_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string_prop"]) -> typing.Union[MetaOapg.properties.string_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date_prop"]) -> typing.Union[MetaOapg.properties.date_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["datetime_prop"]) -> typing.Union[MetaOapg.properties.datetime_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_nullable_prop"]) -> typing.Union[MetaOapg.properties.array_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_and_items_nullable_prop"]) -> typing.Union[MetaOapg.properties.array_and_items_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_items_nullable"]) -> typing.Union[MetaOapg.properties.array_items_nullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_nullable_prop"]) -> typing.Union[MetaOapg.properties.object_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_and_items_nullable_prop"]) -> typing.Union[MetaOapg.properties.object_and_items_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_items_nullable"]) -> typing.Union[MetaOapg.properties.object_items_nullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["integer_prop"], typing_extensions.Literal["number_prop"], typing_extensions.Literal["boolean_prop"], typing_extensions.Literal["string_prop"], typing_extensions.Literal["date_prop"], typing_extensions.Literal["datetime_prop"], typing_extensions.Literal["array_nullable_prop"], typing_extensions.Literal["array_and_items_nullable_prop"], typing_extensions.Literal["array_items_nullable"], typing_extensions.Literal["object_nullable_prop"], typing_extensions.Literal["object_and_items_nullable_prop"], typing_extensions.Literal["object_items_nullable"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - integer_prop: typing.Union[MetaOapg.properties.integer_prop, None, decimal.Decimal, int, schemas.Unset] = schemas.unset, - number_prop: typing.Union[MetaOapg.properties.number_prop, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - boolean_prop: typing.Union[MetaOapg.properties.boolean_prop, None, bool, schemas.Unset] = schemas.unset, - string_prop: typing.Union[MetaOapg.properties.string_prop, None, str, schemas.Unset] = schemas.unset, - date_prop: typing.Union[MetaOapg.properties.date_prop, None, str, date, schemas.Unset] = schemas.unset, - datetime_prop: typing.Union[MetaOapg.properties.datetime_prop, None, str, datetime, schemas.Unset] = schemas.unset, - array_nullable_prop: typing.Union[MetaOapg.properties.array_nullable_prop, list, tuple, None, schemas.Unset] = schemas.unset, - array_and_items_nullable_prop: typing.Union[MetaOapg.properties.array_and_items_nullable_prop, list, tuple, None, schemas.Unset] = schemas.unset, - array_items_nullable: typing.Union[MetaOapg.properties.array_items_nullable, list, tuple, schemas.Unset] = schemas.unset, - object_nullable_prop: typing.Union[MetaOapg.properties.object_nullable_prop, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - object_and_items_nullable_prop: typing.Union[MetaOapg.properties.object_and_items_nullable_prop, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - object_items_nullable: typing.Union[MetaOapg.properties.object_items_nullable, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'NullableClass': - return super().__new__( - cls, - *_args, - integer_prop=integer_prop, - number_prop=number_prop, - boolean_prop=boolean_prop, - string_prop=string_prop, - date_prop=date_prop, - datetime_prop=datetime_prop, - array_nullable_prop=array_nullable_prop, - array_and_items_nullable_prop=array_and_items_nullable_prop, - array_items_nullable=array_items_nullable, - object_nullable_prop=object_nullable_prop, - object_and_items_nullable_prop=object_and_items_nullable_prop, - object_items_nullable=object_items_nullable, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi deleted file mode 100644 index 4bc17e7e05c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.pyi +++ /dev/null @@ -1,576 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableClass( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class integer_prop( - schemas.IntBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'integer_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class number_prop( - schemas.NumberBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneDecimalMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, decimal.Decimal, int, float, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'number_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class boolean_prop( - schemas.BoolBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneBoolMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, bool, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'boolean_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class string_prop( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'string_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class date_prop( - schemas.DateBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date' - - - def __new__( - cls, - *_args: typing.Union[None, str, date, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'date_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class datetime_prop( - schemas.DateTimeBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin - ): - - - class MetaOapg: - format = 'date-time' - - - def __new__( - cls, - *_args: typing.Union[None, str, datetime, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'datetime_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_nullable_prop( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - items = schemas.DictSchema - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_and_items_nullable_prop( - schemas.ListBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneTupleMixin - ): - - - class MetaOapg: - - - class items( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - def __new__( - cls, - *_args: typing.Union[list, tuple, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_and_items_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - - class array_items_nullable( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'items': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, None, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'array_items_nullable': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class object_nullable_prop( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - class MetaOapg: - additional_properties = schemas.DictSchema - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, ], - ) -> 'object_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class object_and_items_nullable_prop( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'object_and_items_nullable_prop': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - - class object_items_nullable( - schemas.DictSchema - ): - - - class MetaOapg: - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'object_items_nullable': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "integer_prop": integer_prop, - "number_prop": number_prop, - "boolean_prop": boolean_prop, - "string_prop": string_prop, - "date_prop": date_prop, - "datetime_prop": datetime_prop, - "array_nullable_prop": array_nullable_prop, - "array_and_items_nullable_prop": array_and_items_nullable_prop, - "array_items_nullable": array_items_nullable, - "object_nullable_prop": object_nullable_prop, - "object_and_items_nullable_prop": object_and_items_nullable_prop, - "object_items_nullable": object_items_nullable, - } - - - class additional_properties( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'additional_properties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer_prop"]) -> MetaOapg.properties.integer_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number_prop"]) -> MetaOapg.properties.number_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["boolean_prop"]) -> MetaOapg.properties.boolean_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string_prop"]) -> MetaOapg.properties.string_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date_prop"]) -> MetaOapg.properties.date_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["datetime_prop"]) -> MetaOapg.properties.datetime_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_nullable_prop"]) -> MetaOapg.properties.array_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_and_items_nullable_prop"]) -> MetaOapg.properties.array_and_items_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["array_items_nullable"]) -> MetaOapg.properties.array_items_nullable: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_nullable_prop"]) -> MetaOapg.properties.object_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_and_items_nullable_prop"]) -> MetaOapg.properties.object_and_items_nullable_prop: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["object_items_nullable"]) -> MetaOapg.properties.object_items_nullable: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["integer_prop"], typing_extensions.Literal["number_prop"], typing_extensions.Literal["boolean_prop"], typing_extensions.Literal["string_prop"], typing_extensions.Literal["date_prop"], typing_extensions.Literal["datetime_prop"], typing_extensions.Literal["array_nullable_prop"], typing_extensions.Literal["array_and_items_nullable_prop"], typing_extensions.Literal["array_items_nullable"], typing_extensions.Literal["object_nullable_prop"], typing_extensions.Literal["object_and_items_nullable_prop"], typing_extensions.Literal["object_items_nullable"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer_prop"]) -> typing.Union[MetaOapg.properties.integer_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number_prop"]) -> typing.Union[MetaOapg.properties.number_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["boolean_prop"]) -> typing.Union[MetaOapg.properties.boolean_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string_prop"]) -> typing.Union[MetaOapg.properties.string_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date_prop"]) -> typing.Union[MetaOapg.properties.date_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["datetime_prop"]) -> typing.Union[MetaOapg.properties.datetime_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_nullable_prop"]) -> typing.Union[MetaOapg.properties.array_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_and_items_nullable_prop"]) -> typing.Union[MetaOapg.properties.array_and_items_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["array_items_nullable"]) -> typing.Union[MetaOapg.properties.array_items_nullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_nullable_prop"]) -> typing.Union[MetaOapg.properties.object_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_and_items_nullable_prop"]) -> typing.Union[MetaOapg.properties.object_and_items_nullable_prop, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["object_items_nullable"]) -> typing.Union[MetaOapg.properties.object_items_nullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["integer_prop"], typing_extensions.Literal["number_prop"], typing_extensions.Literal["boolean_prop"], typing_extensions.Literal["string_prop"], typing_extensions.Literal["date_prop"], typing_extensions.Literal["datetime_prop"], typing_extensions.Literal["array_nullable_prop"], typing_extensions.Literal["array_and_items_nullable_prop"], typing_extensions.Literal["array_items_nullable"], typing_extensions.Literal["object_nullable_prop"], typing_extensions.Literal["object_and_items_nullable_prop"], typing_extensions.Literal["object_items_nullable"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - integer_prop: typing.Union[MetaOapg.properties.integer_prop, None, decimal.Decimal, int, schemas.Unset] = schemas.unset, - number_prop: typing.Union[MetaOapg.properties.number_prop, None, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - boolean_prop: typing.Union[MetaOapg.properties.boolean_prop, None, bool, schemas.Unset] = schemas.unset, - string_prop: typing.Union[MetaOapg.properties.string_prop, None, str, schemas.Unset] = schemas.unset, - date_prop: typing.Union[MetaOapg.properties.date_prop, None, str, date, schemas.Unset] = schemas.unset, - datetime_prop: typing.Union[MetaOapg.properties.datetime_prop, None, str, datetime, schemas.Unset] = schemas.unset, - array_nullable_prop: typing.Union[MetaOapg.properties.array_nullable_prop, list, tuple, None, schemas.Unset] = schemas.unset, - array_and_items_nullable_prop: typing.Union[MetaOapg.properties.array_and_items_nullable_prop, list, tuple, None, schemas.Unset] = schemas.unset, - array_items_nullable: typing.Union[MetaOapg.properties.array_items_nullable, list, tuple, schemas.Unset] = schemas.unset, - object_nullable_prop: typing.Union[MetaOapg.properties.object_nullable_prop, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - object_and_items_nullable_prop: typing.Union[MetaOapg.properties.object_and_items_nullable_prop, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - object_items_nullable: typing.Union[MetaOapg.properties.object_items_nullable, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, None, ], - ) -> 'NullableClass': - return super().__new__( - cls, - *_args, - integer_prop=integer_prop, - number_prop=number_prop, - boolean_prop=boolean_prop, - string_prop=string_prop, - date_prop=date_prop, - datetime_prop=datetime_prop, - array_nullable_prop=array_nullable_prop, - array_and_items_nullable_prop=array_and_items_nullable_prop, - array_items_nullable=array_items_nullable, - object_nullable_prop=object_nullable_prop, - object_and_items_nullable_prop=object_and_items_nullable_prop, - object_items_nullable=object_items_nullable, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py deleted file mode 100644 index 8db6f7f445b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableShape( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) - """ - - - class MetaOapg: - one_of_2 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Triangle, - Quadrilateral, - cls.one_of_2, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NullableShape': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi deleted file mode 100644 index 8db6f7f445b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.pyi +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableShape( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The value may be a shape or the 'null' value. For a composed schema to validate a null payload, one of its chosen oneOf schemas must be type null or nullable (introduced in OAS schema >= 3.0) - """ - - - class MetaOapg: - one_of_2 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Triangle, - Quadrilateral, - cls.one_of_2, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NullableShape': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py deleted file mode 100644 index 6a101a6f191..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableString( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NullableString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi deleted file mode 100644 index 6a101a6f191..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_string.pyi +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NullableString( - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'NullableString': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number.py b/samples/openapi3/client/petstore/python/petstore_api/model/number.py deleted file mode 100644 index 7210b911ced..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Number = schemas.NumberSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/number.pyi deleted file mode 100644 index 7210b911ced..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -Number = schemas.NumberSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py deleted file mode 100644 index 1fe492fe06e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - JustNumber = schemas.NumberSchema - __annotations__ = { - "JustNumber": JustNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["JustNumber"]) -> MetaOapg.properties.JustNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["JustNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["JustNumber"]) -> typing.Union[MetaOapg.properties.JustNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["JustNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - JustNumber: typing.Union[MetaOapg.properties.JustNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NumberOnly': - return super().__new__( - cls, - *_args, - JustNumber=JustNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi deleted file mode 100644 index 1fe492fe06e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NumberOnly( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - JustNumber = schemas.NumberSchema - __annotations__ = { - "JustNumber": JustNumber, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["JustNumber"]) -> MetaOapg.properties.JustNumber: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["JustNumber", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["JustNumber"]) -> typing.Union[MetaOapg.properties.JustNumber, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["JustNumber", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - JustNumber: typing.Union[MetaOapg.properties.JustNumber, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'NumberOnly': - return super().__new__( - cls, - *_args, - JustNumber=JustNumber, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py deleted file mode 100644 index f8b63e35856..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NumberWithValidations( - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - inclusive_maximum = 20 - inclusive_minimum = 10 diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.pyi deleted file mode 100644 index 4e92a920061..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class NumberWithValidations( - schemas.NumberSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py deleted file mode 100644 index 05dc6ddd565..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -ObjectInterface = schemas.DictSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.pyi deleted file mode 100644 index 05dc6ddd565..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_interface.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -ObjectInterface = schemas.DictSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py deleted file mode 100644 index 7e933ca8efc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectModelWithArgAndArgsProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "args", - "arg", - } - - class properties: - arg = schemas.StrSchema - args = schemas.StrSchema - __annotations__ = { - "arg": arg, - "args": args, - } - - args: MetaOapg.properties.args - arg: MetaOapg.properties.arg - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - args: typing.Union[MetaOapg.properties.args, str, ], - arg: typing.Union[MetaOapg.properties.arg, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectModelWithArgAndArgsProperties': - return super().__new__( - cls, - *_args, - args=args, - arg=arg, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi deleted file mode 100644 index 7e933ca8efc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_arg_and_args_properties.pyi +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectModelWithArgAndArgsProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "args", - "arg", - } - - class properties: - arg = schemas.StrSchema - args = schemas.StrSchema - __annotations__ = { - "arg": arg, - "args": args, - } - - args: MetaOapg.properties.args - arg: MetaOapg.properties.arg - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["arg"]) -> MetaOapg.properties.arg: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["args"]) -> MetaOapg.properties.args: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["arg", "args", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - args: typing.Union[MetaOapg.properties.args, str, ], - arg: typing.Union[MetaOapg.properties.arg, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectModelWithArgAndArgsProperties': - return super().__new__( - cls, - *_args, - args=args, - arg=arg, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py deleted file mode 100644 index c8a6acc6e6a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectModelWithRefProps( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def myNumber() -> typing.Type['NumberWithValidations']: - return NumberWithValidations - myString = schemas.StrSchema - myBoolean = schemas.BoolSchema - __annotations__ = { - "myNumber": myNumber, - "myString": myString, - "myBoolean": myBoolean, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myNumber"]) -> 'NumberWithValidations': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myString"]) -> MetaOapg.properties.myString: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> MetaOapg.properties.myBoolean: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["myNumber", "myString", "myBoolean", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myNumber"]) -> typing.Union['NumberWithValidations', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myString"]) -> typing.Union[MetaOapg.properties.myString, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union[MetaOapg.properties.myBoolean, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["myNumber", "myString", "myBoolean", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - myNumber: typing.Union['NumberWithValidations', schemas.Unset] = schemas.unset, - myString: typing.Union[MetaOapg.properties.myString, str, schemas.Unset] = schemas.unset, - myBoolean: typing.Union[MetaOapg.properties.myBoolean, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectModelWithRefProps': - return super().__new__( - cls, - *_args, - myNumber=myNumber, - myString=myString, - myBoolean=myBoolean, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi deleted file mode 100644 index c8a6acc6e6a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectModelWithRefProps( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations - """ - - - class MetaOapg: - - class properties: - - @staticmethod - def myNumber() -> typing.Type['NumberWithValidations']: - return NumberWithValidations - myString = schemas.StrSchema - myBoolean = schemas.BoolSchema - __annotations__ = { - "myNumber": myNumber, - "myString": myString, - "myBoolean": myBoolean, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myNumber"]) -> 'NumberWithValidations': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myString"]) -> MetaOapg.properties.myString: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["myBoolean"]) -> MetaOapg.properties.myBoolean: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["myNumber", "myString", "myBoolean", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myNumber"]) -> typing.Union['NumberWithValidations', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myString"]) -> typing.Union[MetaOapg.properties.myString, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["myBoolean"]) -> typing.Union[MetaOapg.properties.myBoolean, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["myNumber", "myString", "myBoolean", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - myNumber: typing.Union['NumberWithValidations', schemas.Unset] = schemas.unset, - myString: typing.Union[MetaOapg.properties.myString, str, schemas.Unset] = schemas.unset, - myBoolean: typing.Union[MetaOapg.properties.myBoolean, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectModelWithRefProps': - return super().__new__( - cls, - *_args, - myNumber=myNumber, - myString=myString, - myBoolean=myBoolean, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.number_with_validations import NumberWithValidations diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py deleted file mode 100644 index 8e2e6d57fbf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "test", - } - - class properties: - name = schemas.StrSchema - __annotations__ = { - "name": name, - } - - test: schemas.AnyTypeSchema - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - test: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - test=test, - name=name, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ObjectWithOptionalTestProp, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithAllOfWithReqTestPropFromUnsetAddProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.object_with_optional_test_prop import ObjectWithOptionalTestProp diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi deleted file mode 100644 index 8e2e6d57fbf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_all_of_with_req_test_prop_from_unset_add_prop.pyi +++ /dev/null @@ -1,124 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - required = { - "test", - } - - class properties: - name = schemas.StrSchema - __annotations__ = { - "name": name, - } - - test: schemas.AnyTypeSchema - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - test: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - test=test, - name=name, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ObjectWithOptionalTestProp, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithAllOfWithReqTestPropFromUnsetAddProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.object_with_optional_test_prop import ObjectWithOptionalTestProp diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py deleted file mode 100644 index 0a7e9039310..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithDecimalProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - length = schemas.DecimalSchema - width = schemas.DecimalSchema - - @staticmethod - def cost() -> typing.Type['Money']: - return Money - __annotations__ = { - "length": length, - "width": width, - "cost": cost, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["length"]) -> MetaOapg.properties.length: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cost"]) -> 'Money': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["length", "width", "cost", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union[MetaOapg.properties.length, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> typing.Union[MetaOapg.properties.width, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cost"]) -> typing.Union['Money', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["length", "width", "cost", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, - width: typing.Union[MetaOapg.properties.width, str, schemas.Unset] = schemas.unset, - cost: typing.Union['Money', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithDecimalProperties': - return super().__new__( - cls, - *_args, - length=length, - width=width, - cost=cost, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.money import Money diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi deleted file mode 100644 index 0a7e9039310..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_decimal_properties.pyi +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithDecimalProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - length = schemas.DecimalSchema - width = schemas.DecimalSchema - - @staticmethod - def cost() -> typing.Type['Money']: - return Money - __annotations__ = { - "length": length, - "width": width, - "cost": cost, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["length"]) -> MetaOapg.properties.length: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["cost"]) -> 'Money': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["length", "width", "cost", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["length"]) -> typing.Union[MetaOapg.properties.length, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> typing.Union[MetaOapg.properties.width, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["cost"]) -> typing.Union['Money', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["length", "width", "cost", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - length: typing.Union[MetaOapg.properties.length, str, schemas.Unset] = schemas.unset, - width: typing.Union[MetaOapg.properties.width, str, schemas.Unset] = schemas.unset, - cost: typing.Union['Money', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithDecimalProperties': - return super().__new__( - cls, - *_args, - length=length, - width=width, - cost=cost, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.money import Money diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py deleted file mode 100644 index 37f42e7b076..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithDifficultlyNamedProps( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with properties that have invalid names for python - """ - - - class MetaOapg: - required = { - "123-list", - } - - class properties: - _123_list = schemas.StrSchema - special_property_name = schemas.Int64Schema - _123_number = schemas.IntSchema - __annotations__ = { - "123-list": _123_list, - "$special[property.name]": special_property_name, - "123Number": _123_number, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["123-list"]) -> MetaOapg.properties._123_list: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["$special[property.name]"]) -> MetaOapg.properties.special_property_name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["123Number"]) -> MetaOapg.properties._123_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["123-list", "$special[property.name]", "123Number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["123-list"]) -> MetaOapg.properties._123_list: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["$special[property.name]"]) -> typing.Union[MetaOapg.properties.special_property_name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["123Number"]) -> typing.Union[MetaOapg.properties._123_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["123-list", "$special[property.name]", "123Number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithDifficultlyNamedProps': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi deleted file mode 100644 index 37f42e7b076..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_difficultly_named_props.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithDifficultlyNamedProps( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with properties that have invalid names for python - """ - - - class MetaOapg: - required = { - "123-list", - } - - class properties: - _123_list = schemas.StrSchema - special_property_name = schemas.Int64Schema - _123_number = schemas.IntSchema - __annotations__ = { - "123-list": _123_list, - "$special[property.name]": special_property_name, - "123Number": _123_number, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["123-list"]) -> MetaOapg.properties._123_list: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["$special[property.name]"]) -> MetaOapg.properties.special_property_name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["123Number"]) -> MetaOapg.properties._123_number: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["123-list", "$special[property.name]", "123Number", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["123-list"]) -> MetaOapg.properties._123_list: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["$special[property.name]"]) -> typing.Union[MetaOapg.properties.special_property_name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["123Number"]) -> typing.Union[MetaOapg.properties._123_number, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["123-list", "$special[property.name]", "123Number", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithDifficultlyNamedProps': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py deleted file mode 100644 index 9e3d9a17421..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithInlineCompositionProperty( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithInlineCompositionProperty': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi deleted file mode 100644 index f1c85b1203f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_inline_composition_property.pyi +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithInlineCompositionProperty( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithInlineCompositionProperty': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py deleted file mode 100644 index 4a2cff98032..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithInvalidNamedRefedProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "!reference", - "from", - } - - class properties: - - @staticmethod - def _from() -> typing.Type['FromSchema']: - return FromSchema - - @staticmethod - def reference() -> typing.Type['ArrayWithValidationsInItems']: - return ArrayWithValidationsInItems - __annotations__ = { - "from": _from, - "!reference": reference, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithInvalidNamedRefedProperties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api.model.from_schema import FromSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi deleted file mode 100644 index 4a2cff98032..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_invalid_named_refed_properties.pyi +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithInvalidNamedRefedProperties( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "!reference", - "from", - } - - class properties: - - @staticmethod - def _from() -> typing.Type['FromSchema']: - return FromSchema - - @staticmethod - def reference() -> typing.Type['ArrayWithValidationsInItems']: - return ArrayWithValidationsInItems - __annotations__ = { - "from": _from, - "!reference": reference, - } - - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["from"]) -> 'FromSchema': ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["!reference"]) -> 'ArrayWithValidationsInItems': ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "!reference", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithInvalidNamedRefedProperties': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api.model.from_schema import FromSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py deleted file mode 100644 index 9a75d3bd022..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithOptionalTestProp( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - test = schemas.StrSchema - __annotations__ = { - "test": test, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["test"]) -> MetaOapg.properties.test: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["test", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["test"]) -> typing.Union[MetaOapg.properties.test, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["test", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - test: typing.Union[MetaOapg.properties.test, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithOptionalTestProp': - return super().__new__( - cls, - *_args, - test=test, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi deleted file mode 100644 index 9a75d3bd022..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_optional_test_prop.pyi +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithOptionalTestProp( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - test = schemas.StrSchema - __annotations__ = { - "test": test, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["test"]) -> MetaOapg.properties.test: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["test", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["test"]) -> typing.Union[MetaOapg.properties.test, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["test", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - test: typing.Union[MetaOapg.properties.test, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithOptionalTestProp': - return super().__new__( - cls, - *_args, - test=test, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py deleted file mode 100644 index 474721b0401..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithValidations( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - min_properties = 2 - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithValidations': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi deleted file mode 100644 index d1937c96fa0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/object_with_validations.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ObjectWithValidations( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ObjectWithValidations': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.py b/samples/openapi3/client/petstore/python/petstore_api/model/order.py deleted file mode 100644 index 83a587222a1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Order( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - petId = schemas.Int64Schema - quantity = schemas.Int32Schema - shipDate = schemas.DateTimeSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - } - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") - complete = schemas.BoolSchema - __annotations__ = { - "id": id, - "petId": petId, - "quantity": quantity, - "shipDate": shipDate, - "status": status, - "complete": complete, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["petId"]) -> MetaOapg.properties.petId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quantity"]) -> MetaOapg.properties.quantity: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shipDate"]) -> MetaOapg.properties.shipDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["complete"]) -> MetaOapg.properties.complete: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "petId", "quantity", "shipDate", "status", "complete", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["petId"]) -> typing.Union[MetaOapg.properties.petId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quantity"]) -> typing.Union[MetaOapg.properties.quantity, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shipDate"]) -> typing.Union[MetaOapg.properties.shipDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["complete"]) -> typing.Union[MetaOapg.properties.complete, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "petId", "quantity", "shipDate", "status", "complete", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, - quantity: typing.Union[MetaOapg.properties.quantity, decimal.Decimal, int, schemas.Unset] = schemas.unset, - shipDate: typing.Union[MetaOapg.properties.shipDate, str, datetime, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - complete: typing.Union[MetaOapg.properties.complete, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Order': - return super().__new__( - cls, - *_args, - id=id, - petId=petId, - quantity=quantity, - shipDate=shipDate, - status=status, - complete=complete, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi deleted file mode 100644 index 61ac9cf6f63..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/order.pyi +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Order( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - petId = schemas.Int64Schema - quantity = schemas.Int32Schema - shipDate = schemas.DateTimeSchema - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") - complete = schemas.BoolSchema - __annotations__ = { - "id": id, - "petId": petId, - "quantity": quantity, - "shipDate": shipDate, - "status": status, - "complete": complete, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["petId"]) -> MetaOapg.properties.petId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quantity"]) -> MetaOapg.properties.quantity: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shipDate"]) -> MetaOapg.properties.shipDate: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["complete"]) -> MetaOapg.properties.complete: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "petId", "quantity", "shipDate", "status", "complete", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["petId"]) -> typing.Union[MetaOapg.properties.petId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quantity"]) -> typing.Union[MetaOapg.properties.quantity, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shipDate"]) -> typing.Union[MetaOapg.properties.shipDate, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["complete"]) -> typing.Union[MetaOapg.properties.complete, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "petId", "quantity", "shipDate", "status", "complete", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - petId: typing.Union[MetaOapg.properties.petId, decimal.Decimal, int, schemas.Unset] = schemas.unset, - quantity: typing.Union[MetaOapg.properties.quantity, decimal.Decimal, int, schemas.Unset] = schemas.unset, - shipDate: typing.Union[MetaOapg.properties.shipDate, str, datetime, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - complete: typing.Union[MetaOapg.properties.complete, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Order': - return super().__new__( - cls, - *_args, - id=id, - petId=petId, - quantity=quantity, - shipDate=shipDate, - status=status, - complete=complete, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py deleted file mode 100644 index 6988fb92ef7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ParentPet( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'pet_type': { - 'ChildCat': ChildCat, - } - } - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - GrandparentAnimal, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ParentPet': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.child_cat import ChildCat -from petstore_api.model.grandparent_animal import GrandparentAnimal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi deleted file mode 100644 index 6988fb92ef7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.pyi +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ParentPet( - schemas.ComposedBase, - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'pet_type': { - 'ChildCat': ChildCat, - } - } - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - GrandparentAnimal, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ParentPet': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.child_cat import ChildCat -from petstore_api.model.grandparent_animal import GrandparentAnimal diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py deleted file mode 100644 index 4a9b5902024..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py +++ /dev/null @@ -1,215 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Pet( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Pet object that needs to be added to the store - """ - - - class MetaOapg: - required = { - "photoUrls", - "name", - } - - class properties: - name = schemas.StrSchema - - - class photoUrls( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'photoUrls': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - id = schemas.Int64Schema - - @staticmethod - def category() -> typing.Type['Category']: - return Category - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Tag']: - return Tag - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Tag': - return super().__getitem__(i) - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "available": "AVAILABLE", - "pending": "PENDING", - "sold": "SOLD", - } - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - __annotations__ = { - "name": name, - "photoUrls": photoUrls, - "id": id, - "category": category, - "tags": tags, - "status": status, - } - - photoUrls: MetaOapg.properties.photoUrls - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["photoUrls"]) -> MetaOapg.properties.photoUrls: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["category"]) -> 'Category': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "photoUrls", "id", "category", "tags", "status", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["photoUrls"]) -> MetaOapg.properties.photoUrls: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["category"]) -> typing.Union['Category', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "photoUrls", "id", "category", "tags", "status", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - photoUrls: typing.Union[MetaOapg.properties.photoUrls, list, tuple, ], - name: typing.Union[MetaOapg.properties.name, str, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - category: typing.Union['Category', schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pet': - return super().__new__( - cls, - *_args, - photoUrls=photoUrls, - name=name, - id=id, - category=category, - tags=tags, - status=status, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.category import Category -from petstore_api.model.tag import Tag diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi deleted file mode 100644 index e0a7276e144..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.pyi +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Pet( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Pet object that needs to be added to the store - """ - - - class MetaOapg: - required = { - "photoUrls", - "name", - } - - class properties: - name = schemas.StrSchema - - - class photoUrls( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'photoUrls': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - id = schemas.Int64Schema - - @staticmethod - def category() -> typing.Type['Category']: - return Category - - - class tags( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Tag']: - return Tag - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'tags': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Tag': - return super().__getitem__(i) - - - class status( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - __annotations__ = { - "name": name, - "photoUrls": photoUrls, - "id": id, - "category": category, - "tags": tags, - "status": status, - } - - photoUrls: MetaOapg.properties.photoUrls - name: MetaOapg.properties.name - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["photoUrls"]) -> MetaOapg.properties.photoUrls: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["category"]) -> 'Category': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "photoUrls", "id", "category", "tags", "status", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["photoUrls"]) -> MetaOapg.properties.photoUrls: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["category"]) -> typing.Union['Category', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "photoUrls", "id", "category", "tags", "status", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - photoUrls: typing.Union[MetaOapg.properties.photoUrls, list, tuple, ], - name: typing.Union[MetaOapg.properties.name, str, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - category: typing.Union['Category', schemas.Unset] = schemas.unset, - tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pet': - return super().__new__( - cls, - *_args, - photoUrls=photoUrls, - name=name, - id=id, - category=category, - tags=tags, - status=status, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.category import Category -from petstore_api.model.tag import Tag diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py deleted file mode 100644 index 55fd75d15dc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Pig( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'className': { - 'BasquePig': BasquePig, - 'DanishPig': DanishPig, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - BasquePig, - DanishPig, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pig': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.basque_pig import BasquePig -from petstore_api.model.danish_pig import DanishPig diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi deleted file mode 100644 index 55fd75d15dc..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Pig( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'className': { - 'BasquePig': BasquePig, - 'DanishPig': DanishPig, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - BasquePig, - DanishPig, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Pig': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.basque_pig import BasquePig -from petstore_api.model.danish_pig import DanishPig diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/player.py b/samples/openapi3/client/petstore/python/petstore_api/model/player.py deleted file mode 100644 index 832a0af4697..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/player.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Player( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties - """ - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - - @staticmethod - def enemyPlayer() -> typing.Type['Player']: - return Player - __annotations__ = { - "name": name, - "enemyPlayer": enemyPlayer, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enemyPlayer"]) -> 'Player': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "enemyPlayer", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enemyPlayer"]) -> typing.Union['Player', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "enemyPlayer", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - enemyPlayer: typing.Union['Player', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Player': - return super().__new__( - cls, - *_args, - name=name, - enemyPlayer=enemyPlayer, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi deleted file mode 100644 index 832a0af4697..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/player.pyi +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Player( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - a model that includes a self reference this forces properties and additionalProperties to be lazy loaded in python models because the Player class has not fully loaded when defining properties - """ - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - - @staticmethod - def enemyPlayer() -> typing.Type['Player']: - return Player - __annotations__ = { - "name": name, - "enemyPlayer": enemyPlayer, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enemyPlayer"]) -> 'Player': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "enemyPlayer", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enemyPlayer"]) -> typing.Union['Player', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "enemyPlayer", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - enemyPlayer: typing.Union['Player', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Player': - return super().__new__( - cls, - *_args, - name=name, - enemyPlayer=enemyPlayer, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py deleted file mode 100644 index 757991e0b89..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Quadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'quadrilateralType': { - 'ComplexQuadrilateral': ComplexQuadrilateral, - 'SimpleQuadrilateral': SimpleQuadrilateral, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - SimpleQuadrilateral, - ComplexQuadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Quadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi deleted file mode 100644 index 757991e0b89..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Quadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'quadrilateralType': { - 'ComplexQuadrilateral': ComplexQuadrilateral, - 'SimpleQuadrilateral': SimpleQuadrilateral, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - SimpleQuadrilateral, - ComplexQuadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Quadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py deleted file mode 100644 index 2370a2a9945..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class QuadrilateralInterface( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "shapeType", - "quadrilateralType", - } - - class properties: - - - class shapeType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "Quadrilateral": "QUADRILATERAL", - } - - @schemas.classproperty - def QUADRILATERAL(cls): - return cls("Quadrilateral") - quadrilateralType = schemas.StrSchema - __annotations__ = { - "shapeType": shapeType, - "quadrilateralType": quadrilateralType, - } - - - shapeType: MetaOapg.properties.shapeType - quadrilateralType: MetaOapg.properties.quadrilateralType - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["shapeType", "quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["shapeType", "quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'QuadrilateralInterface': - return super().__new__( - cls, - *_args, - shapeType=shapeType, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi deleted file mode 100644 index 0cf90d53917..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class QuadrilateralInterface( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "shapeType", - "quadrilateralType", - } - - class properties: - - - class shapeType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def QUADRILATERAL(cls): - return cls("Quadrilateral") - quadrilateralType = schemas.StrSchema - __annotations__ = { - "shapeType": shapeType, - "quadrilateralType": quadrilateralType, - } - - - shapeType: MetaOapg.properties.shapeType - quadrilateralType: MetaOapg.properties.quadrilateralType - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["shapeType", "quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["shapeType", "quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'QuadrilateralInterface': - return super().__new__( - cls, - *_args, - shapeType=shapeType, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py deleted file mode 100644 index 8636a04494b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ReadOnlyFirst( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - baz = schemas.StrSchema - __annotations__ = { - "bar": bar, - "baz": baz, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "baz", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> typing.Union[MetaOapg.properties.baz, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "baz", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - baz: typing.Union[MetaOapg.properties.baz, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ReadOnlyFirst': - return super().__new__( - cls, - *_args, - bar=bar, - baz=baz, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi deleted file mode 100644 index 8636a04494b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ReadOnlyFirst( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - bar = schemas.StrSchema - baz = schemas.StrSchema - __annotations__ = { - "bar": bar, - "baz": baz, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["bar"]) -> MetaOapg.properties.bar: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["baz"]) -> MetaOapg.properties.baz: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["bar", "baz", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["bar"]) -> typing.Union[MetaOapg.properties.bar, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["baz"]) -> typing.Union[MetaOapg.properties.baz, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["bar", "baz", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - bar: typing.Union[MetaOapg.properties.bar, str, schemas.Unset] = schemas.unset, - baz: typing.Union[MetaOapg.properties.baz, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ReadOnlyFirst': - return super().__new__( - cls, - *_args, - bar=bar, - baz=baz, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py deleted file mode 100644 index 2bb4e44cf5d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ScaleneTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "ScaleneTriangle": "SCALENE_TRIANGLE", - } - - @schemas.classproperty - def SCALENE_TRIANGLE(cls): - return cls("ScaleneTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScaleneTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi deleted file mode 100644 index 7411424cfa4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ScaleneTriangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class triangleType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def SCALENE_TRIANGLE(cls): - return cls("ScaleneTriangle") - __annotations__ = { - "triangleType": triangleType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> typing.Union[MetaOapg.properties.triangleType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - TriangleInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ScaleneTriangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.triangle_interface import TriangleInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py deleted file mode 100644 index 59fb712a683..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Shape( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'shapeType': { - 'Quadrilateral': Quadrilateral, - 'Triangle': Triangle, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Triangle, - Quadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Shape': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi deleted file mode 100644 index 59fb712a683..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Shape( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'shapeType': { - 'Quadrilateral': Quadrilateral, - 'Triangle': Triangle, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - Triangle, - Quadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Shape': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py deleted file mode 100644 index 8481fb3a8de..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ShapeOrNull( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'shapeType': { - 'Quadrilateral': Quadrilateral, - 'Triangle': Triangle, - } - } - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - Triangle, - Quadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ShapeOrNull': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi deleted file mode 100644 index 8481fb3a8de..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.pyi +++ /dev/null @@ -1,81 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class ShapeOrNull( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'shapeType': { - 'Quadrilateral': Quadrilateral, - 'Triangle': Triangle, - } - } - one_of_0 = schemas.NoneSchema - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.one_of_0, - Triangle, - Quadrilateral, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ShapeOrNull': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.triangle import Triangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py deleted file mode 100644 index b7037f9a543..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SimpleQuadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class quadrilateralType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "SimpleQuadrilateral": "SIMPLE_QUADRILATERAL", - } - - @schemas.classproperty - def SIMPLE_QUADRILATERAL(cls): - return cls("SimpleQuadrilateral") - __annotations__ = { - "quadrilateralType": quadrilateralType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - QuadrilateralInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SimpleQuadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi deleted file mode 100644 index 5c0b4007b85..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SimpleQuadrilateral( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - - class all_of_1( - schemas.DictSchema - ): - - - class MetaOapg: - - class properties: - - - class quadrilateralType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def SIMPLE_QUADRILATERAL(cls): - return cls("SimpleQuadrilateral") - __annotations__ = { - "quadrilateralType": quadrilateralType, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["quadrilateralType"]) -> MetaOapg.properties.quadrilateralType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["quadrilateralType"]) -> typing.Union[MetaOapg.properties.quadrilateralType, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["quadrilateralType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - quadrilateralType: typing.Union[MetaOapg.properties.quadrilateralType, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'all_of_1': - return super().__new__( - cls, - *_args, - quadrilateralType=quadrilateralType, - _configuration=_configuration, - **kwargs, - ) - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - QuadrilateralInterface, - cls.all_of_1, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SimpleQuadrilateral': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py deleted file mode 100644 index 6bab0aa21be..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SomeObject( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ObjectInterface, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SomeObject': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.object_interface import ObjectInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi deleted file mode 100644 index 6bab0aa21be..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.pyi +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SomeObject( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - ObjectInterface, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SomeObject': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.object_interface import ObjectInterface diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py deleted file mode 100644 index cf21054ba50..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SpecialModelName( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python - """ - - - class MetaOapg: - - class properties: - a = schemas.StrSchema - __annotations__ = { - "a": a, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["a"]) -> MetaOapg.properties.a: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["a"]) -> typing.Union[MetaOapg.properties.a, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - a: typing.Union[MetaOapg.properties.a, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SpecialModelName': - return super().__new__( - cls, - *_args, - a=a, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi deleted file mode 100644 index cf21054ba50..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.pyi +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class SpecialModelName( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - model with an invalid class name for python - """ - - - class MetaOapg: - - class properties: - a = schemas.StrSchema - __annotations__ = { - "a": a, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["a"]) -> MetaOapg.properties.a: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["a"]) -> typing.Union[MetaOapg.properties.a, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["a", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - a: typing.Union[MetaOapg.properties.a, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SpecialModelName': - return super().__new__( - cls, - *_args, - a=a, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string.py b/samples/openapi3/client/petstore/python/petstore_api/model/string.py deleted file mode 100644 index 9e0907b4269..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -String = schemas.StrSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string.pyi deleted file mode 100644 index 9e0907b4269..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string.pyi +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 -String = schemas.StrSchema diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py deleted file mode 100644 index 005f6d1ade7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringBooleanMap( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'StringBooleanMap': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi deleted file mode 100644 index 005f6d1ade7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_boolean_map.pyi +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringBooleanMap( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - additional_properties = schemas.BoolSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, bool, ], - ) -> 'StringBooleanMap': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py deleted file mode 100644 index 0f3c2561625..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringEnum( - schemas.EnumBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - "single quoted": "SINGLE_QUOTED", - "multiple\nlines": "MULTIPLE_LINES", - "double quote \n with newline": "DOUBLE_QUOTE_WITH_NEWLINE", - schemas.NoneClass.NONE: "NONE", - } - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") - - @schemas.classproperty - def SINGLE_QUOTED(cls): - return cls("single quoted") - - @schemas.classproperty - def MULTIPLE_LINES(cls): - return cls("multiple\nlines") - - @schemas.classproperty - def DOUBLE_QUOTE_WITH_NEWLINE(cls): - return cls("double quote \n with newline") - - @schemas.classproperty - def NONE(cls): - return cls(None) - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StringEnum': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi deleted file mode 100644 index 0f3c2561625..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.pyi +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringEnum( - schemas.EnumBase, - schemas.StrBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneStrMixin -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - "single quoted": "SINGLE_QUOTED", - "multiple\nlines": "MULTIPLE_LINES", - "double quote \n with newline": "DOUBLE_QUOTE_WITH_NEWLINE", - schemas.NoneClass.NONE: "NONE", - } - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") - - @schemas.classproperty - def SINGLE_QUOTED(cls): - return cls("single quoted") - - @schemas.classproperty - def MULTIPLE_LINES(cls): - return cls("multiple\nlines") - - @schemas.classproperty - def DOUBLE_QUOTE_WITH_NEWLINE(cls): - return cls("double quote \n with newline") - - @schemas.classproperty - def NONE(cls): - return cls(None) - - - def __new__( - cls, - *_args: typing.Union[None, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StringEnum': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py deleted file mode 100644 index 85260096555..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringEnumWithDefaultValue( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - enum_value_to_name = { - "placed": "PLACED", - "approved": "APPROVED", - "delivered": "DELIVERED", - } - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.pyi deleted file mode 100644 index e51581c628f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.pyi +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringEnumWithDefaultValue( - schemas.EnumBase, - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - @schemas.classproperty - def PLACED(cls): - return cls("placed") - - @schemas.classproperty - def APPROVED(cls): - return cls("approved") - - @schemas.classproperty - def DELIVERED(cls): - return cls("delivered") diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.py deleted file mode 100644 index 61ff6fcc31d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringWithValidation( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - min_length = 7 diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.pyi deleted file mode 100644 index df0be025130..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/string_with_validation.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class StringWithValidation( - schemas.StrSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py deleted file mode 100644 index 2628e605ba7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Tag( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - name = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Tag': - return super().__new__( - cls, - *_args, - id=id, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi deleted file mode 100644 index 2628e605ba7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.pyi +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Tag( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - name = schemas.StrSchema - __annotations__ = { - "id": id, - "name": name, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "name", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "name", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Tag': - return super().__new__( - cls, - *_args, - id=id, - name=name, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py deleted file mode 100644 index 1e7b13c2785..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Triangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'triangleType': { - 'EquilateralTriangle': EquilateralTriangle, - 'IsoscelesTriangle': IsoscelesTriangle, - 'ScaleneTriangle': ScaleneTriangle, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - EquilateralTriangle, - IsoscelesTriangle, - ScaleneTriangle, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Triangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.scalene_triangle import ScaleneTriangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi deleted file mode 100644 index 1e7b13c2785..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.pyi +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Triangle( - schemas.ComposedSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - @staticmethod - def discriminator(): - return { - 'triangleType': { - 'EquilateralTriangle': EquilateralTriangle, - 'IsoscelesTriangle': IsoscelesTriangle, - 'ScaleneTriangle': ScaleneTriangle, - } - } - - @classmethod - @functools.lru_cache() - def one_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - EquilateralTriangle, - IsoscelesTriangle, - ScaleneTriangle, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Triangle': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - -from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.scalene_triangle import ScaleneTriangle diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py deleted file mode 100644 index 2521058b489..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class TriangleInterface( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "shapeType", - "triangleType", - } - - class properties: - - - class shapeType( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "Triangle": "TRIANGLE", - } - - @schemas.classproperty - def TRIANGLE(cls): - return cls("Triangle") - triangleType = schemas.StrSchema - __annotations__ = { - "shapeType": shapeType, - "triangleType": triangleType, - } - - - shapeType: MetaOapg.properties.shapeType - triangleType: MetaOapg.properties.triangleType - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["shapeType", "triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["shapeType", "triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TriangleInterface': - return super().__new__( - cls, - *_args, - shapeType=shapeType, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi deleted file mode 100644 index 24d263a5695..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.pyi +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class TriangleInterface( - schemas.AnyTypeSchema, -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "shapeType", - "triangleType", - } - - class properties: - - - class shapeType( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def TRIANGLE(cls): - return cls("Triangle") - triangleType = schemas.StrSchema - __annotations__ = { - "shapeType": shapeType, - "triangleType": triangleType, - } - - - shapeType: MetaOapg.properties.shapeType - triangleType: MetaOapg.properties.triangleType - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["shapeType", "triangleType", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["shapeType"]) -> MetaOapg.properties.shapeType: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["triangleType"]) -> MetaOapg.properties.triangleType: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["shapeType", "triangleType", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - shapeType: typing.Union[MetaOapg.properties.shapeType, str, ], - triangleType: typing.Union[MetaOapg.properties.triangleType, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'TriangleInterface': - return super().__new__( - cls, - *_args, - shapeType=shapeType, - triangleType=triangleType, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.py b/samples/openapi3/client/petstore/python/petstore_api/model/user.py deleted file mode 100644 index ade6f72fce5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.py +++ /dev/null @@ -1,241 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class User( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - username = schemas.StrSchema - firstName = schemas.StrSchema - lastName = schemas.StrSchema - email = schemas.StrSchema - password = schemas.StrSchema - phone = schemas.StrSchema - userStatus = schemas.Int32Schema - objectWithNoDeclaredProps = schemas.DictSchema - - - class objectWithNoDeclaredPropsNullable( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'objectWithNoDeclaredPropsNullable': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anyTypeProp = schemas.AnyTypeSchema - - - class anyTypeExceptNullProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - not_schema = schemas.NoneSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'anyTypeExceptNullProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anyTypePropNullable = schemas.AnyTypeSchema - __annotations__ = { - "id": id, - "username": username, - "firstName": firstName, - "lastName": lastName, - "email": email, - "password": password, - "phone": phone, - "userStatus": userStatus, - "objectWithNoDeclaredProps": objectWithNoDeclaredProps, - "objectWithNoDeclaredPropsNullable": objectWithNoDeclaredPropsNullable, - "anyTypeProp": anyTypeProp, - "anyTypeExceptNullProp": anyTypeExceptNullProp, - "anyTypePropNullable": anyTypePropNullable, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstName"]) -> MetaOapg.properties.firstName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastName"]) -> MetaOapg.properties.lastName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["phone"]) -> MetaOapg.properties.phone: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userStatus"]) -> MetaOapg.properties.userStatus: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["objectWithNoDeclaredProps"]) -> MetaOapg.properties.objectWithNoDeclaredProps: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["objectWithNoDeclaredPropsNullable"]) -> MetaOapg.properties.objectWithNoDeclaredPropsNullable: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypeProp"]) -> MetaOapg.properties.anyTypeProp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypeExceptNullProp"]) -> MetaOapg.properties.anyTypeExceptNullProp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypePropNullable"]) -> MetaOapg.properties.anyTypePropNullable: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus", "objectWithNoDeclaredProps", "objectWithNoDeclaredPropsNullable", "anyTypeProp", "anyTypeExceptNullProp", "anyTypePropNullable", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstName"]) -> typing.Union[MetaOapg.properties.firstName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastName"]) -> typing.Union[MetaOapg.properties.lastName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["phone"]) -> typing.Union[MetaOapg.properties.phone, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userStatus"]) -> typing.Union[MetaOapg.properties.userStatus, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["objectWithNoDeclaredProps"]) -> typing.Union[MetaOapg.properties.objectWithNoDeclaredProps, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["objectWithNoDeclaredPropsNullable"]) -> typing.Union[MetaOapg.properties.objectWithNoDeclaredPropsNullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypeProp"]) -> typing.Union[MetaOapg.properties.anyTypeProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypeExceptNullProp"]) -> typing.Union[MetaOapg.properties.anyTypeExceptNullProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypePropNullable"]) -> typing.Union[MetaOapg.properties.anyTypePropNullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus", "objectWithNoDeclaredProps", "objectWithNoDeclaredPropsNullable", "anyTypeProp", "anyTypeExceptNullProp", "anyTypePropNullable", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - firstName: typing.Union[MetaOapg.properties.firstName, str, schemas.Unset] = schemas.unset, - lastName: typing.Union[MetaOapg.properties.lastName, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - phone: typing.Union[MetaOapg.properties.phone, str, schemas.Unset] = schemas.unset, - userStatus: typing.Union[MetaOapg.properties.userStatus, decimal.Decimal, int, schemas.Unset] = schemas.unset, - objectWithNoDeclaredProps: typing.Union[MetaOapg.properties.objectWithNoDeclaredProps, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - objectWithNoDeclaredPropsNullable: typing.Union[MetaOapg.properties.objectWithNoDeclaredPropsNullable, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - anyTypeProp: typing.Union[MetaOapg.properties.anyTypeProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypeExceptNullProp: typing.Union[MetaOapg.properties.anyTypeExceptNullProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypePropNullable: typing.Union[MetaOapg.properties.anyTypePropNullable, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'User': - return super().__new__( - cls, - *_args, - id=id, - username=username, - firstName=firstName, - lastName=lastName, - email=email, - password=password, - phone=phone, - userStatus=userStatus, - objectWithNoDeclaredProps=objectWithNoDeclaredProps, - objectWithNoDeclaredPropsNullable=objectWithNoDeclaredPropsNullable, - anyTypeProp=anyTypeProp, - anyTypeExceptNullProp=anyTypeExceptNullProp, - anyTypePropNullable=anyTypePropNullable, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi deleted file mode 100644 index ade6f72fce5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/user.pyi +++ /dev/null @@ -1,241 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class User( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - id = schemas.Int64Schema - username = schemas.StrSchema - firstName = schemas.StrSchema - lastName = schemas.StrSchema - email = schemas.StrSchema - password = schemas.StrSchema - phone = schemas.StrSchema - userStatus = schemas.Int32Schema - objectWithNoDeclaredProps = schemas.DictSchema - - - class objectWithNoDeclaredPropsNullable( - schemas.DictBase, - schemas.NoneBase, - schemas.Schema, - schemas.NoneFrozenDictMixin - ): - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, None, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'objectWithNoDeclaredPropsNullable': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anyTypeProp = schemas.AnyTypeSchema - - - class anyTypeExceptNullProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - not_schema = schemas.NoneSchema - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'anyTypeExceptNullProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - anyTypePropNullable = schemas.AnyTypeSchema - __annotations__ = { - "id": id, - "username": username, - "firstName": firstName, - "lastName": lastName, - "email": email, - "password": password, - "phone": phone, - "userStatus": userStatus, - "objectWithNoDeclaredProps": objectWithNoDeclaredProps, - "objectWithNoDeclaredPropsNullable": objectWithNoDeclaredPropsNullable, - "anyTypeProp": anyTypeProp, - "anyTypeExceptNullProp": anyTypeExceptNullProp, - "anyTypePropNullable": anyTypePropNullable, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["firstName"]) -> MetaOapg.properties.firstName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lastName"]) -> MetaOapg.properties.lastName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["phone"]) -> MetaOapg.properties.phone: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userStatus"]) -> MetaOapg.properties.userStatus: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["objectWithNoDeclaredProps"]) -> MetaOapg.properties.objectWithNoDeclaredProps: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["objectWithNoDeclaredPropsNullable"]) -> MetaOapg.properties.objectWithNoDeclaredPropsNullable: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypeProp"]) -> MetaOapg.properties.anyTypeProp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypeExceptNullProp"]) -> MetaOapg.properties.anyTypeExceptNullProp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["anyTypePropNullable"]) -> MetaOapg.properties.anyTypePropNullable: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus", "objectWithNoDeclaredProps", "objectWithNoDeclaredPropsNullable", "anyTypeProp", "anyTypeExceptNullProp", "anyTypePropNullable", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["firstName"]) -> typing.Union[MetaOapg.properties.firstName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["lastName"]) -> typing.Union[MetaOapg.properties.lastName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["phone"]) -> typing.Union[MetaOapg.properties.phone, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userStatus"]) -> typing.Union[MetaOapg.properties.userStatus, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["objectWithNoDeclaredProps"]) -> typing.Union[MetaOapg.properties.objectWithNoDeclaredProps, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["objectWithNoDeclaredPropsNullable"]) -> typing.Union[MetaOapg.properties.objectWithNoDeclaredPropsNullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypeProp"]) -> typing.Union[MetaOapg.properties.anyTypeProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypeExceptNullProp"]) -> typing.Union[MetaOapg.properties.anyTypeExceptNullProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["anyTypePropNullable"]) -> typing.Union[MetaOapg.properties.anyTypePropNullable, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["id", "username", "firstName", "lastName", "email", "password", "phone", "userStatus", "objectWithNoDeclaredProps", "objectWithNoDeclaredPropsNullable", "anyTypeProp", "anyTypeExceptNullProp", "anyTypePropNullable", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - firstName: typing.Union[MetaOapg.properties.firstName, str, schemas.Unset] = schemas.unset, - lastName: typing.Union[MetaOapg.properties.lastName, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - phone: typing.Union[MetaOapg.properties.phone, str, schemas.Unset] = schemas.unset, - userStatus: typing.Union[MetaOapg.properties.userStatus, decimal.Decimal, int, schemas.Unset] = schemas.unset, - objectWithNoDeclaredProps: typing.Union[MetaOapg.properties.objectWithNoDeclaredProps, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - objectWithNoDeclaredPropsNullable: typing.Union[MetaOapg.properties.objectWithNoDeclaredPropsNullable, dict, frozendict.frozendict, None, schemas.Unset] = schemas.unset, - anyTypeProp: typing.Union[MetaOapg.properties.anyTypeProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypeExceptNullProp: typing.Union[MetaOapg.properties.anyTypeExceptNullProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - anyTypePropNullable: typing.Union[MetaOapg.properties.anyTypePropNullable, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'User': - return super().__new__( - cls, - *_args, - id=id, - username=username, - firstName=firstName, - lastName=lastName, - email=email, - password=password, - phone=phone, - userStatus=userStatus, - objectWithNoDeclaredProps=objectWithNoDeclaredProps, - objectWithNoDeclaredPropsNullable=objectWithNoDeclaredPropsNullable, - anyTypeProp=anyTypeProp, - anyTypeExceptNullProp=anyTypeExceptNullProp, - anyTypePropNullable=anyTypePropNullable, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.py b/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.py deleted file mode 100644 index 92a3825e376..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class UUIDString( - schemas.UUIDSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - format = 'uuid' - min_length = 1 diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.pyi deleted file mode 100644 index 80495060cf8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/uuid_string.pyi +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class UUIDString( - schemas.UUIDSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py deleted file mode 100644 index 40c14099ab8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Whale( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "whale": "WHALE", - } - - @schemas.classproperty - def WHALE(cls): - return cls("whale") - hasBaleen = schemas.BoolSchema - hasTeeth = schemas.BoolSchema - __annotations__ = { - "className": className, - "hasBaleen": hasBaleen, - "hasTeeth": hasTeeth, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasBaleen"]) -> MetaOapg.properties.hasBaleen: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasTeeth"]) -> MetaOapg.properties.hasTeeth: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", "hasBaleen", "hasTeeth", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasBaleen"]) -> typing.Union[MetaOapg.properties.hasBaleen, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasTeeth"]) -> typing.Union[MetaOapg.properties.hasTeeth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", "hasBaleen", "hasTeeth", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - hasBaleen: typing.Union[MetaOapg.properties.hasBaleen, bool, schemas.Unset] = schemas.unset, - hasTeeth: typing.Union[MetaOapg.properties.hasTeeth, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Whale': - return super().__new__( - cls, - *_args, - className=className, - hasBaleen=hasBaleen, - hasTeeth=hasTeeth, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi deleted file mode 100644 index 3eb37ff18d7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.pyi +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Whale( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def WHALE(cls): - return cls("whale") - hasBaleen = schemas.BoolSchema - hasTeeth = schemas.BoolSchema - __annotations__ = { - "className": className, - "hasBaleen": hasBaleen, - "hasTeeth": hasTeeth, - } - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasBaleen"]) -> MetaOapg.properties.hasBaleen: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasTeeth"]) -> MetaOapg.properties.hasTeeth: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className", "hasBaleen", "hasTeeth", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasBaleen"]) -> typing.Union[MetaOapg.properties.hasBaleen, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasTeeth"]) -> typing.Union[MetaOapg.properties.hasTeeth, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className", "hasBaleen", "hasTeeth", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - hasBaleen: typing.Union[MetaOapg.properties.hasBaleen, bool, schemas.Unset] = schemas.unset, - hasTeeth: typing.Union[MetaOapg.properties.hasTeeth, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'Whale': - return super().__new__( - cls, - *_args, - className=className, - hasBaleen=hasBaleen, - hasTeeth=hasTeeth, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py deleted file mode 100644 index 92723dd978b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Zebra( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "zebra": "ZEBRA", - } - - @schemas.classproperty - def ZEBRA(cls): - return cls("zebra") - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "plains": "PLAINS", - "mountain": "MOUNTAIN", - "grevys": "GREVYS", - } - - @schemas.classproperty - def PLAINS(cls): - return cls("plains") - - @schemas.classproperty - def MOUNTAIN(cls): - return cls("mountain") - - @schemas.classproperty - def GREVYS(cls): - return cls("grevys") - __annotations__ = { - "className": className, - "type": type, - } - additional_properties = schemas.AnyTypeSchema - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className"], typing_extensions.Literal["type"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className"], typing_extensions.Literal["type"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'Zebra': - return super().__new__( - cls, - *_args, - className=className, - type=type, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi b/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi deleted file mode 100644 index ee12ea4ba47..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/model/zebra.pyi +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - -class Zebra( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - required = { - "className", - } - - class properties: - - - class className( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def ZEBRA(cls): - return cls("zebra") - - - class type( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def PLAINS(cls): - return cls("plains") - - @schemas.classproperty - def MOUNTAIN(cls): - return cls("mountain") - - @schemas.classproperty - def GREVYS(cls): - return cls("grevys") - __annotations__ = { - "className": className, - "type": type, - } - additional_properties = schemas.AnyTypeSchema - - className: MetaOapg.properties.className - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: str) -> MetaOapg.additional_properties: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["className"], typing_extensions.Literal["type"], str, ]): - # dict_instance[name] accessor - return super().__getitem__(name) - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["className"]) -> MetaOapg.properties.className: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["className"], typing_extensions.Literal["type"], str, ]): - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - className: typing.Union[MetaOapg.properties.className, str, ], - type: typing.Union[MetaOapg.properties.type, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - ) -> 'Zebra': - return super().__new__( - cls, - *_args, - className=className, - type=type, - _configuration=_configuration, - **kwargs, - ) diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py deleted file mode 100644 index c2efa73d6af..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# import all models into this package -# if you have many models here with many references from one model to another this may -# raise a RecursionError -# to avoid this, import only the models that you directly need like: -# from petstore_api.model.pet import Pet -# or import this package, but before doing it, use: -# import sys -# sys.setrecursionlimit(n) - -from petstore_api.model.additional_properties_class import AdditionalPropertiesClass -from petstore_api.model.additional_properties_validator import AdditionalPropertiesValidator -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -from petstore_api.model.address import Address -from petstore_api.model.animal import Animal -from petstore_api.model.animal_farm import AnimalFarm -from petstore_api.model.any_type_and_format import AnyTypeAndFormat -from petstore_api.model.any_type_not_string import AnyTypeNotString -from petstore_api.model.api_response import ApiResponse -from petstore_api.model.apple import Apple -from petstore_api.model.apple_req import AppleReq -from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType -from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly -from petstore_api.model.array_of_enums import ArrayOfEnums -from petstore_api.model.array_of_number_only import ArrayOfNumberOnly -from petstore_api.model.array_test import ArrayTest -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api.model.banana import Banana -from petstore_api.model.banana_req import BananaReq -from petstore_api.model.bar import Bar -from petstore_api.model.basque_pig import BasquePig -from petstore_api.model.boolean import Boolean -from petstore_api.model.boolean_enum import BooleanEnum -from petstore_api.model.capitalization import Capitalization -from petstore_api.model.cat import Cat -from petstore_api.model.category import Category -from petstore_api.model.child_cat import ChildCat -from petstore_api.model.class_model import ClassModel -from petstore_api.model.client import Client -from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations -from petstore_api.model.composed_array import ComposedArray -from petstore_api.model.composed_bool import ComposedBool -from petstore_api.model.composed_none import ComposedNone -from petstore_api.model.composed_number import ComposedNumber -from petstore_api.model.composed_object import ComposedObject -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -from petstore_api.model.composed_string import ComposedString -from petstore_api.model.currency import Currency -from petstore_api.model.danish_pig import DanishPig -from petstore_api.model.date_time_test import DateTimeTest -from petstore_api.model.date_time_with_validations import DateTimeWithValidations -from petstore_api.model.date_with_validations import DateWithValidations -from petstore_api.model.decimal_payload import DecimalPayload -from petstore_api.model.dog import Dog -from petstore_api.model.drawing import Drawing -from petstore_api.model.enum_arrays import EnumArrays -from petstore_api.model.enum_class import EnumClass -from petstore_api.model.enum_test import EnumTest -from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.file import File -from petstore_api.model.file_schema_test_class import FileSchemaTestClass -from petstore_api.model.foo import Foo -from petstore_api.model.format_test import FormatTest -from petstore_api.model.from_schema import FromSchema -from petstore_api.model.fruit import Fruit -from petstore_api.model.fruit_req import FruitReq -from petstore_api.model.gm_fruit import GmFruit -from petstore_api.model.grandparent_animal import GrandparentAnimal -from petstore_api.model.has_only_read_only import HasOnlyReadOnly -from petstore_api.model.health_check_result import HealthCheckResult -from petstore_api.model.integer_enum import IntegerEnum -from petstore_api.model.integer_enum_big import IntegerEnumBig -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue -from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue -from petstore_api.model.integer_max10 import IntegerMax10 -from petstore_api.model.integer_min15 import IntegerMin15 -from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.json_patch_request import JSONPatchRequest -from petstore_api.model.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest -from petstore_api.model.json_patch_request_move_copy import JSONPatchRequestMoveCopy -from petstore_api.model.json_patch_request_remove import JSONPatchRequestRemove -from petstore_api.model.mammal import Mammal -from petstore_api.model.map_test import MapTest -from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass -from petstore_api.model.model200_response import Model200Response -from petstore_api.model.model_return import ModelReturn -from petstore_api.model.money import Money -from petstore_api.model.name import Name -from petstore_api.model.no_additional_properties import NoAdditionalProperties -from petstore_api.model.nullable_class import NullableClass -from petstore_api.model.nullable_shape import NullableShape -from petstore_api.model.nullable_string import NullableString -from petstore_api.model.number import Number -from petstore_api.model.number_only import NumberOnly -from petstore_api.model.number_with_validations import NumberWithValidations -from petstore_api.model.object_interface import ObjectInterface -from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -from petstore_api.model.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp -from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties -from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps -from petstore_api.model.object_with_inline_composition_property import ObjectWithInlineCompositionProperty -from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties -from petstore_api.model.object_with_optional_test_prop import ObjectWithOptionalTestProp -from petstore_api.model.object_with_validations import ObjectWithValidations -from petstore_api.model.order import Order -from petstore_api.model.parent_pet import ParentPet -from petstore_api.model.pet import Pet -from petstore_api.model.pig import Pig -from petstore_api.model.player import Player -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface -from petstore_api.model.read_only_first import ReadOnlyFirst -from petstore_api.model.scalene_triangle import ScaleneTriangle -from petstore_api.model.shape import Shape -from petstore_api.model.shape_or_null import ShapeOrNull -from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral -from petstore_api.model.some_object import SomeObject -from petstore_api.model.special_model_name import SpecialModelName -from petstore_api.model.string import String -from petstore_api.model.string_boolean_map import StringBooleanMap -from petstore_api.model.string_enum import StringEnum -from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue -from petstore_api.model.string_with_validation import StringWithValidation -from petstore_api.model.tag import Tag -from petstore_api.model.triangle import Triangle -from petstore_api.model.triangle_interface import TriangleInterface -from petstore_api.model.uuid_string import UUIDString -from petstore_api.model.user import User -from petstore_api.model.whale import Whale -from petstore_api.model.zebra import Zebra diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py deleted file mode 100644 index 79f28fc11eb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/__init__.py +++ /dev/null @@ -1,56 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.apis.path_to_api import path_to_api - -import enum - - -class PathValues(str, enum.Enum): - FOO = "/foo" - PET = "/pet" - PET_FIND_BY_STATUS = "/pet/findByStatus" - PET_FIND_BY_TAGS = "/pet/findByTags" - PET_PET_ID = "/pet/{petId}" - PET_PET_ID_UPLOAD_IMAGE = "/pet/{petId}/uploadImage" - STORE_INVENTORY = "/store/inventory" - STORE_ORDER = "/store/order" - STORE_ORDER_ORDER_ID = "/store/order/{order_id}" - USER = "/user" - USER_CREATE_WITH_ARRAY = "/user/createWithArray" - USER_CREATE_WITH_LIST = "/user/createWithList" - USER_LOGIN = "/user/login" - USER_LOGOUT = "/user/logout" - USER_USERNAME = "/user/{username}" - FAKE_CLASSNAME_TEST = "/fake_classname_test" - FAKE = "/fake" - FAKE_REFS_NUMBER = "/fake/refs/number" - FAKE_REFS_MAMMAL = "/fake/refs/mammal" - FAKE_REFS_STRING = "/fake/refs/string" - FAKE_REFS_BOOLEAN = "/fake/refs/boolean" - FAKE_REFS_ARRAYMODEL = "/fake/refs/arraymodel" - FAKE_REFS_COMPOSED_ONE_OF_NUMBER_WITH_VALIDATIONS = "/fake/refs/composed_one_of_number_with_validations" - FAKE_REFS_OBJECT_MODEL_WITH_REF_PROPS = "/fake/refs/object_model_with_ref_props" - FAKE_REFS_ENUM = "/fake/refs/enum" - FAKE_REFS_ARRAYOFENUMS = "/fake/refs/array-of-enums" - FAKE_ADDITIONALPROPERTIESWITHARRAYOFENUMS = "/fake/additional-properties-with-array-of-enums" - FAKE_JSON_FORM_DATA = "/fake/jsonFormData" - FAKE_INLINEADDITIONAL_PROPERTIES = "/fake/inline-additionalProperties" - FAKE_BODYWITHQUERYPARAMS = "/fake/body-with-query-params" - ANOTHERFAKE_DUMMY = "/another-fake/dummy" - FAKE_BODYWITHFILESCHEMA = "/fake/body-with-file-schema" - FAKE_CASESENSITIVEPARAMS = "/fake/case-sensitive-params" - FAKE_TESTQUERYPARAMETERS = "/fake/test-query-parameters" - FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE = "/fake/{petId}/uploadImageWithRequiredFile" - FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_ = "/fake/parameterCollisions/{1}/{aB}/{Ab}/{self}/{A-B}/" - FAKE_UPLOAD_FILE = "/fake/uploadFile" - FAKE_UPLOAD_FILES = "/fake/uploadFiles" - FAKE_UPLOAD_DOWNLOAD_FILE = "/fake/uploadDownloadFile" - FAKE_HEALTH = "/fake/health" - FAKE_INLINE_COMPOSITION_ = "/fake/inlineComposition/" - FAKE_OBJ_IN_QUERY = "/fake/objInQuery" - FAKE_REF_OBJ_IN_QUERY = "/fake/refObjInQuery" - FAKE_JSON_WITH_CHARSET = "/fake/jsonWithCharset" - FAKE_RESPONSE_WITHOUT_SCHEMA = "/fake/responseWithoutSchema" - FAKE_JSON_PATCH = "/fake/jsonPatch" - FAKE_DELETE_COFFEE_ID = "/fake/deleteCoffee/{id}" - FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE = "/fake/queryParamWithJsonContentType" diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/__init__.py deleted file mode 100644 index 565ab17736e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.another_fake_dummy import Api - -from petstore_api.paths import PathValues - -path = PathValues.ANOTHERFAKE_DUMMY \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py deleted file mode 100644 index 344845d8e66..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.py +++ /dev/null @@ -1,333 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test special tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Call123TestSpecialTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._call_123_test_special_tags_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._call_123_test_special_tags_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi deleted file mode 100644 index e8fddde768d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/another_fake_dummy/patch.pyi +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _call_123_test_special_tags_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test special tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Call123TestSpecialTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def call_123_test_special_tags( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._call_123_test_special_tags_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._call_123_test_special_tags_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/__init__.py deleted file mode 100644 index 6e6df72bd84..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py deleted file mode 100644 index 33d2c33e141..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.py +++ /dev/null @@ -1,354 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params -RequiredStringGroupSchema = schemas.IntSchema -RequiredInt64GroupSchema = schemas.Int64Schema -StringGroupSchema = schemas.IntSchema -Int64GroupSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'required_string_group': typing.Union[RequiredStringGroupSchema, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[RequiredInt64GroupSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'string_group': typing.Union[StringGroupSchema, decimal.Decimal, int, ], - 'int64_group': typing.Union[Int64GroupSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_required_string_group = api_client.QueryParameter( - name="required_string_group", - style=api_client.ParameterStyle.FORM, - schema=RequiredStringGroupSchema, - required=True, - explode=True, -) -request_query_required_int64_group = api_client.QueryParameter( - name="required_int64_group", - style=api_client.ParameterStyle.FORM, - schema=RequiredInt64GroupSchema, - required=True, - explode=True, -) -request_query_string_group = api_client.QueryParameter( - name="string_group", - style=api_client.ParameterStyle.FORM, - schema=StringGroupSchema, - explode=True, -) -request_query_int64_group = api_client.QueryParameter( - name="int64_group", - style=api_client.ParameterStyle.FORM, - schema=Int64GroupSchema, - explode=True, -) -# Header params -RequiredBooleanGroupSchema = schemas.BoolSchema -BooleanGroupSchema = schemas.BoolSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - 'required_boolean_group': typing.Union[RequiredBooleanGroupSchema, bool, ], - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'boolean_group': typing.Union[BooleanGroupSchema, bool, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_required_boolean_group = api_client.HeaderParameter( - name="required_boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=RequiredBooleanGroupSchema, - required=True, -) -request_header_boolean_group = api_client.HeaderParameter( - name="boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=BooleanGroupSchema, -) -_auth = [ - 'bearer_test', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _group_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fake endpoint to test group parameters (optional) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_required_string_group, - request_query_required_int64_group, - request_query_string_group, - request_query_int64_group, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_required_boolean_group, - request_header_boolean_group, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GroupParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def group_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._group_parameters_oapg( - query_params=query_params, - header_params=header_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._group_parameters_oapg( - query_params=query_params, - header_params=header_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi deleted file mode 100644 index c86c4fed8e1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/delete.pyi +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params -RequiredStringGroupSchema = schemas.IntSchema -RequiredInt64GroupSchema = schemas.Int64Schema -StringGroupSchema = schemas.IntSchema -Int64GroupSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'required_string_group': typing.Union[RequiredStringGroupSchema, decimal.Decimal, int, ], - 'required_int64_group': typing.Union[RequiredInt64GroupSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'string_group': typing.Union[StringGroupSchema, decimal.Decimal, int, ], - 'int64_group': typing.Union[Int64GroupSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_required_string_group = api_client.QueryParameter( - name="required_string_group", - style=api_client.ParameterStyle.FORM, - schema=RequiredStringGroupSchema, - required=True, - explode=True, -) -request_query_required_int64_group = api_client.QueryParameter( - name="required_int64_group", - style=api_client.ParameterStyle.FORM, - schema=RequiredInt64GroupSchema, - required=True, - explode=True, -) -request_query_string_group = api_client.QueryParameter( - name="string_group", - style=api_client.ParameterStyle.FORM, - schema=StringGroupSchema, - explode=True, -) -request_query_int64_group = api_client.QueryParameter( - name="int64_group", - style=api_client.ParameterStyle.FORM, - schema=Int64GroupSchema, - explode=True, -) -# Header params -RequiredBooleanGroupSchema = schemas.BoolSchema -BooleanGroupSchema = schemas.BoolSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - 'required_boolean_group': typing.Union[RequiredBooleanGroupSchema, bool, ], - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'boolean_group': typing.Union[BooleanGroupSchema, bool, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_required_boolean_group = api_client.HeaderParameter( - name="required_boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=RequiredBooleanGroupSchema, - required=True, -) -request_header_boolean_group = api_client.HeaderParameter( - name="boolean_group", - style=api_client.ParameterStyle.SIMPLE, - schema=BooleanGroupSchema, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _group_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _group_parameters_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fake endpoint to test group parameters (optional) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_required_string_group, - request_query_required_int64_group, - request_query_string_group, - request_query_int64_group, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_required_boolean_group, - request_header_boolean_group, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GroupParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def group_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def group_parameters( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._group_parameters_oapg( - query_params=query_params, - header_params=header_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._group_parameters_oapg( - query_params=query_params, - header_params=header_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py deleted file mode 100644 index 968217f3d23..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.py +++ /dev/null @@ -1,786 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params - - -class EnumQueryStringArraySchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - ">": "GREATER_THAN", - "$": "DOLLAR", - } - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EnumQueryStringArraySchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class EnumQueryStringSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "_abc": "_ABC", - "-efg": "EFG", - "(xyz)": "XYZ", - } - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - - -class EnumQueryIntegerSchema( - schemas.EnumBase, - schemas.Int32Schema -): - - - class MetaOapg: - format = 'int32' - enum_value_to_name = { - 1: "POSITIVE_1", - -2: "NEGATIVE_2", - } - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def NEGATIVE_2(cls): - return cls(-2) - - -class EnumQueryDoubleSchema( - schemas.EnumBase, - schemas.Float64Schema -): - - - class MetaOapg: - format = 'double' - enum_value_to_name = { - 1.1: "POSITIVE_1_PT_1", - -1.2: "NEGATIVE_1_PT_2", - } - - @schemas.classproperty - def POSITIVE_1_PT_1(cls): - return cls(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls): - return cls(-1.2) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'enum_query_string_array': typing.Union[EnumQueryStringArraySchema, list, tuple, ], - 'enum_query_string': typing.Union[EnumQueryStringSchema, str, ], - 'enum_query_integer': typing.Union[EnumQueryIntegerSchema, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[EnumQueryDoubleSchema, decimal.Decimal, int, float, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_enum_query_string_array = api_client.QueryParameter( - name="enum_query_string_array", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryStringArraySchema, - explode=True, -) -request_query_enum_query_string = api_client.QueryParameter( - name="enum_query_string", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryStringSchema, - explode=True, -) -request_query_enum_query_integer = api_client.QueryParameter( - name="enum_query_integer", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryIntegerSchema, - explode=True, -) -request_query_enum_query_double = api_client.QueryParameter( - name="enum_query_double", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryDoubleSchema, - explode=True, -) -# Header params - - -class EnumHeaderStringArraySchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - ">": "GREATER_THAN", - "$": "DOLLAR", - } - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EnumHeaderStringArraySchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class EnumHeaderStringSchema( - schemas.EnumBase, - schemas.StrSchema -): - - - class MetaOapg: - enum_value_to_name = { - "_abc": "_ABC", - "-efg": "EFG", - "(xyz)": "XYZ", - } - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'enum_header_string_array': typing.Union[EnumHeaderStringArraySchema, list, tuple, ], - 'enum_header_string': typing.Union[EnumHeaderStringSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_enum_header_string_array = api_client.HeaderParameter( - name="enum_header_string_array", - style=api_client.ParameterStyle.SIMPLE, - schema=EnumHeaderStringArraySchema, -) -request_header_enum_header_string = api_client.HeaderParameter( - name="enum_header_string", - style=api_client.ParameterStyle.SIMPLE, - schema=EnumHeaderStringSchema, -) -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class enum_form_string_array( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - ">": "GREATER_THAN", - "$": "DOLLAR", - } - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'enum_form_string_array': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_form_string( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "_abc": "_ABC", - "-efg": "EFG", - "(xyz)": "XYZ", - } - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - __annotations__ = { - "enum_form_string_array": enum_form_string_array, - "enum_form_string": enum_form_string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_form_string_array"]) -> MetaOapg.properties.enum_form_string_array: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_form_string"]) -> MetaOapg.properties.enum_form_string: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["enum_form_string_array", "enum_form_string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_form_string_array"]) -> typing.Union[MetaOapg.properties.enum_form_string_array, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_form_string"]) -> typing.Union[MetaOapg.properties.enum_form_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["enum_form_string_array", "enum_form_string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - enum_form_string_array: typing.Union[MetaOapg.properties.enum_form_string_array, list, tuple, schemas.Unset] = schemas.unset, - enum_form_string: typing.Union[MetaOapg.properties.enum_form_string, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - enum_form_string_array=enum_form_string_array, - enum_form_string=enum_form_string, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor404ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, - '404': _response_for_404, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enum_parameters_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _enum_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enum_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test enum parameters - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_enum_query_string_array, - request_query_enum_query_string, - request_query_enum_query_integer, - request_query_enum_query_double, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_enum_header_string_array, - request_header_enum_header_string, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EnumParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enum_parameters( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def enum_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enum_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi deleted file mode 100644 index b2241774a99..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/get.pyi +++ /dev/null @@ -1,719 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params - - -class EnumQueryStringArraySchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EnumQueryStringArraySchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class EnumQueryStringSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - - -class EnumQueryIntegerSchema( - schemas.EnumBase, - schemas.Int32Schema -): - - @schemas.classproperty - def POSITIVE_1(cls): - return cls(1) - - @schemas.classproperty - def NEGATIVE_2(cls): - return cls(-2) - - -class EnumQueryDoubleSchema( - schemas.EnumBase, - schemas.Float64Schema -): - - @schemas.classproperty - def POSITIVE_1_PT_1(cls): - return cls(1.1) - - @schemas.classproperty - def NEGATIVE_1_PT_2(cls): - return cls(-1.2) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'enum_query_string_array': typing.Union[EnumQueryStringArraySchema, list, tuple, ], - 'enum_query_string': typing.Union[EnumQueryStringSchema, str, ], - 'enum_query_integer': typing.Union[EnumQueryIntegerSchema, decimal.Decimal, int, ], - 'enum_query_double': typing.Union[EnumQueryDoubleSchema, decimal.Decimal, int, float, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_enum_query_string_array = api_client.QueryParameter( - name="enum_query_string_array", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryStringArraySchema, - explode=True, -) -request_query_enum_query_string = api_client.QueryParameter( - name="enum_query_string", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryStringSchema, - explode=True, -) -request_query_enum_query_integer = api_client.QueryParameter( - name="enum_query_integer", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryIntegerSchema, - explode=True, -) -request_query_enum_query_double = api_client.QueryParameter( - name="enum_query_double", - style=api_client.ParameterStyle.FORM, - schema=EnumQueryDoubleSchema, - explode=True, -) -# Header params - - -class EnumHeaderStringArraySchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'EnumHeaderStringArraySchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class EnumHeaderStringSchema( - schemas.EnumBase, - schemas.StrSchema -): - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'enum_header_string_array': typing.Union[EnumHeaderStringArraySchema, list, tuple, ], - 'enum_header_string': typing.Union[EnumHeaderStringSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_enum_header_string_array = api_client.HeaderParameter( - name="enum_header_string_array", - style=api_client.ParameterStyle.SIMPLE, - schema=EnumHeaderStringArraySchema, -) -request_header_enum_header_string = api_client.HeaderParameter( - name="enum_header_string", - style=api_client.ParameterStyle.SIMPLE, - schema=EnumHeaderStringSchema, -) -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class enum_form_string_array( - schemas.ListSchema - ): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def GREATER_THAN(cls): - return cls(">") - - @schemas.classproperty - def DOLLAR(cls): - return cls("$") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'enum_form_string_array': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - - class enum_form_string( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def _ABC(cls): - return cls("_abc") - - @schemas.classproperty - def EFG(cls): - return cls("-efg") - - @schemas.classproperty - def XYZ(cls): - return cls("(xyz)") - __annotations__ = { - "enum_form_string_array": enum_form_string_array, - "enum_form_string": enum_form_string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_form_string_array"]) -> MetaOapg.properties.enum_form_string_array: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enum_form_string"]) -> MetaOapg.properties.enum_form_string: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["enum_form_string_array", "enum_form_string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_form_string_array"]) -> typing.Union[MetaOapg.properties.enum_form_string_array, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enum_form_string"]) -> typing.Union[MetaOapg.properties.enum_form_string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["enum_form_string_array", "enum_form_string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - enum_form_string_array: typing.Union[MetaOapg.properties.enum_form_string_array, list, tuple, schemas.Unset] = schemas.unset, - enum_form_string: typing.Union[MetaOapg.properties.enum_form_string, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - enum_form_string_array=enum_form_string_array, - enum_form_string=enum_form_string, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor404ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor404ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor404ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enum_parameters_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _enum_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enum_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enum_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test enum parameters - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_enum_query_string_array, - request_query_enum_query_string, - request_query_enum_query_integer, - request_query_enum_query_double, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_enum_header_string_array, - request_header_enum_header_string, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EnumParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enum_parameters( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def enum_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enum_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enum_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enum_parameters_oapg( - body=body, - query_params=query_params, - header_params=header_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py deleted file mode 100644 index 21b28d9a460..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.py +++ /dev/null @@ -1,333 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test \"client\" model - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ClientModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._client_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._client_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi deleted file mode 100644 index 93f842e888a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/patch.pyi +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _client_model_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test \"client\" model - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ClientModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def client_model( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._client_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._client_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py deleted file mode 100644 index 6f5d487b91d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.py +++ /dev/null @@ -1,583 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "number", - "pattern_without_delimiter", - "byte", - "double", - } - - class properties: - - - class integer( - schemas.IntSchema - ): - - - class MetaOapg: - inclusive_maximum = 100 - inclusive_minimum = 10 - - - class int32( - schemas.Int32Schema - ): - - - class MetaOapg: - format = 'int32' - inclusive_maximum = 200 - inclusive_minimum = 20 - int64 = schemas.Int64Schema - - - class number( - schemas.NumberSchema - ): - - - class MetaOapg: - inclusive_maximum = 543.2 - inclusive_minimum = 32.1 - - - class _float( - schemas.Float32Schema - ): - - - class MetaOapg: - format = 'float' - inclusive_maximum = 987.6 - - - class double( - schemas.Float64Schema - ): - - - class MetaOapg: - format = 'double' - inclusive_maximum = 123.4 - inclusive_minimum = 67.8 - - - class string( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'[a-z]', # noqa: E501 - 'flags': ( - re.IGNORECASE - ) - }] - - - class pattern_without_delimiter( - schemas.StrSchema - ): - - - class MetaOapg: - regex=[{ - 'pattern': r'^[A-Z].*', # noqa: E501 - }] - byte = schemas.StrSchema - binary = schemas.BinarySchema - date = schemas.DateSchema - dateTime = schemas.DateTimeSchema - - - class password( - schemas.StrSchema - ): - - - class MetaOapg: - format = 'password' - max_length = 64 - min_length = 10 - callback = schemas.StrSchema - __annotations__ = { - "integer": integer, - "int32": int32, - "int64": int64, - "number": number, - "float": _float, - "double": double, - "string": string, - "pattern_without_delimiter": pattern_without_delimiter, - "byte": byte, - "binary": binary, - "date": date, - "dateTime": dateTime, - "password": password, - "callback": callback, - } - - number: MetaOapg.properties.number - pattern_without_delimiter: MetaOapg.properties.pattern_without_delimiter - byte: MetaOapg.properties.byte - double: MetaOapg.properties.double - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer"]) -> MetaOapg.properties.integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> MetaOapg.properties.string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_without_delimiter"]) -> MetaOapg.properties.pattern_without_delimiter: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback"]) -> MetaOapg.properties.callback: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["integer", "int32", "int64", "number", "float", "double", "string", "pattern_without_delimiter", "byte", "binary", "date", "dateTime", "password", "callback", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer"]) -> typing.Union[MetaOapg.properties.integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union[MetaOapg.properties.string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_without_delimiter"]) -> MetaOapg.properties.pattern_without_delimiter: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback"]) -> typing.Union[MetaOapg.properties.callback, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["integer", "int32", "int64", "number", "float", "double", "string", "pattern_without_delimiter", "byte", "binary", "date", "dateTime", "password", "callback", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], - pattern_without_delimiter: typing.Union[MetaOapg.properties.pattern_without_delimiter, str, ], - byte: typing.Union[MetaOapg.properties.byte, str, ], - double: typing.Union[MetaOapg.properties.double, decimal.Decimal, int, float, ], - integer: typing.Union[MetaOapg.properties.integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - string: typing.Union[MetaOapg.properties.string, str, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, date, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - callback: typing.Union[MetaOapg.properties.callback, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - number=number, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - double=double, - integer=integer, - int32=int32, - int64=int64, - string=string, - binary=binary, - date=date, - dateTime=dateTime, - password=password, - callback=callback, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) -_auth = [ - 'http_basic_test', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '200': _response_for_200, - '404': _response_for_404, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _endpoint_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _endpoint_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EndpointParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def endpoint_parameters( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def endpoint_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def endpoint_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def endpoint_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def endpoint_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._endpoint_parameters_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._endpoint_parameters_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi deleted file mode 100644 index 3795898d9d3..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake/post.pyi +++ /dev/null @@ -1,534 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "number", - "pattern_without_delimiter", - "byte", - "double", - } - - class properties: - - - class integer( - schemas.IntSchema - ): - pass - - - class int32( - schemas.Int32Schema - ): - pass - int64 = schemas.Int64Schema - - - class number( - schemas.NumberSchema - ): - pass - - - class _float( - schemas.Float32Schema - ): - pass - - - class double( - schemas.Float64Schema - ): - pass - - - class string( - schemas.StrSchema - ): - pass - - - class pattern_without_delimiter( - schemas.StrSchema - ): - pass - byte = schemas.StrSchema - binary = schemas.BinarySchema - date = schemas.DateSchema - dateTime = schemas.DateTimeSchema - - - class password( - schemas.StrSchema - ): - pass - callback = schemas.StrSchema - __annotations__ = { - "integer": integer, - "int32": int32, - "int64": int64, - "number": number, - "float": _float, - "double": double, - "string": string, - "pattern_without_delimiter": pattern_without_delimiter, - "byte": byte, - "binary": binary, - "date": date, - "dateTime": dateTime, - "password": password, - "callback": callback, - } - - number: MetaOapg.properties.number - pattern_without_delimiter: MetaOapg.properties.pattern_without_delimiter - byte: MetaOapg.properties.byte - double: MetaOapg.properties.double - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["integer"]) -> MetaOapg.properties.integer: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int32"]) -> MetaOapg.properties.int32: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["int64"]) -> MetaOapg.properties.int64: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["float"]) -> MetaOapg.properties._float: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> MetaOapg.properties.string: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["pattern_without_delimiter"]) -> MetaOapg.properties.pattern_without_delimiter: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["binary"]) -> MetaOapg.properties.binary: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["date"]) -> MetaOapg.properties.date: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dateTime"]) -> MetaOapg.properties.dateTime: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["callback"]) -> MetaOapg.properties.callback: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["integer", "int32", "int64", "number", "float", "double", "string", "pattern_without_delimiter", "byte", "binary", "date", "dateTime", "password", "callback", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["integer"]) -> typing.Union[MetaOapg.properties.integer, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int32"]) -> typing.Union[MetaOapg.properties.int32, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["int64"]) -> typing.Union[MetaOapg.properties.int64, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["number"]) -> MetaOapg.properties.number: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["float"]) -> typing.Union[MetaOapg.properties._float, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["double"]) -> MetaOapg.properties.double: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union[MetaOapg.properties.string, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["pattern_without_delimiter"]) -> MetaOapg.properties.pattern_without_delimiter: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["byte"]) -> MetaOapg.properties.byte: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["binary"]) -> typing.Union[MetaOapg.properties.binary, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["date"]) -> typing.Union[MetaOapg.properties.date, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dateTime"]) -> typing.Union[MetaOapg.properties.dateTime, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["callback"]) -> typing.Union[MetaOapg.properties.callback, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["integer", "int32", "int64", "number", "float", "double", "string", "pattern_without_delimiter", "byte", "binary", "date", "dateTime", "password", "callback", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - number: typing.Union[MetaOapg.properties.number, decimal.Decimal, int, float, ], - pattern_without_delimiter: typing.Union[MetaOapg.properties.pattern_without_delimiter, str, ], - byte: typing.Union[MetaOapg.properties.byte, str, ], - double: typing.Union[MetaOapg.properties.double, decimal.Decimal, int, float, ], - integer: typing.Union[MetaOapg.properties.integer, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int32: typing.Union[MetaOapg.properties.int32, decimal.Decimal, int, schemas.Unset] = schemas.unset, - int64: typing.Union[MetaOapg.properties.int64, decimal.Decimal, int, schemas.Unset] = schemas.unset, - string: typing.Union[MetaOapg.properties.string, str, schemas.Unset] = schemas.unset, - binary: typing.Union[MetaOapg.properties.binary, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - date: typing.Union[MetaOapg.properties.date, str, date, schemas.Unset] = schemas.unset, - dateTime: typing.Union[MetaOapg.properties.dateTime, str, datetime, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - callback: typing.Union[MetaOapg.properties.callback, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - number=number, - pattern_without_delimiter=pattern_without_delimiter, - byte=byte, - double=double, - integer=integer, - int32=int32, - int64=int64, - string=string, - binary=binary, - date=date, - dateTime=dateTime, - password=password, - callback=callback, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _endpoint_parameters_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _endpoint_parameters_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _endpoint_parameters_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class EndpointParameters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def endpoint_parameters( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def endpoint_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def endpoint_parameters( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def endpoint_parameters( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def endpoint_parameters( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._endpoint_parameters_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._endpoint_parameters_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py deleted file mode 100644 index 704e7f24d97..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_additional_properties_with_array_of_enums import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_ADDITIONALPROPERTIESWITHARRAYOFENUMS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py deleted file mode 100644 index 8ea9735c6fb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.py +++ /dev/null @@ -1,330 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums - - -request_body_additional_properties_with_array_of_enums = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Additional Properties with Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_additional_properties_with_array_of_enums.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AdditionalPropertiesWithArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def additional_properties_with_array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def additional_properties_with_array_of_enums( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._additional_properties_with_array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._additional_properties_with_array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi deleted file mode 100644 index 7422eeaa767..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_additional_properties_with_array_of_enums/get.pyi +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums - -# body param -SchemaForRequestBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums - - -request_body_additional_properties_with_array_of_enums = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = AdditionalPropertiesWithArrayOfEnums - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _additional_properties_with_array_of_enums_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Additional Properties with Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_additional_properties_with_array_of_enums.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AdditionalPropertiesWithArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def additional_properties_with_array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def additional_properties_with_array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def additional_properties_with_array_of_enums( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._additional_properties_with_array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._additional_properties_with_array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/__init__.py deleted file mode 100644 index cae3a5325e8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_body_with_file_schema import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_BODYWITHFILESCHEMA \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py deleted file mode 100644 index bd4bef9f23e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.py +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.file_schema_test_class import FileSchemaTestClass - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = FileSchemaTestClass - - -request_body_file_schema_test_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_file_schema_test_class.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class BodyWithFileSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_file_schema_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_file_schema_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi deleted file mode 100644 index 4ceb43cdc37..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_file_schema/put.pyi +++ /dev/null @@ -1,297 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.file_schema_test_class import FileSchemaTestClass - -# body param -SchemaForRequestBodyApplicationJson = FileSchemaTestClass - - -request_body_file_schema_test_class = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_file_schema_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_file_schema_test_class.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class BodyWithFileSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def body_with_file_schema( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_file_schema_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_file_schema_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/__init__.py deleted file mode 100644 index c79334843e0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_body_with_query_params import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_BODYWITHQUERYPARAMS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py deleted file mode 100644 index 6e0bb85629e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.py +++ /dev/null @@ -1,360 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# Query params -QuerySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - required=True, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_query, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class BodyWithQueryParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_query_params_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_query_params_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi deleted file mode 100644 index 95d12b2a433..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_body_with_query_params/put.pyi +++ /dev/null @@ -1,355 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# Query params -QuerySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - required=True, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _body_with_query_params_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_query, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class BodyWithQueryParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def body_with_query_params( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_query_params_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._body_with_query_params_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/__init__.py deleted file mode 100644 index dcc9e69f9bd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_case_sensitive_params import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_CASESENSITIVEPARAMS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py deleted file mode 100644 index 9bf9cf6480e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.py +++ /dev/null @@ -1,280 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params -SomeVarSchema = schemas.StrSchema -SomeVarSchema = schemas.StrSchema -SomeVarSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'someVar': typing.Union[SomeVarSchema, str, ], - 'SomeVar': typing.Union[SomeVarSchema, str, ], - 'some_var': typing.Union[SomeVarSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_some_var = api_client.QueryParameter( - name="someVar", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) -request_query_some_var2 = api_client.QueryParameter( - name="SomeVar", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) -request_query_some_var3 = api_client.QueryParameter( - name="some_var", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _case_sensitive_params_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_some_var, - request_query_some_var2, - request_query_some_var3, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CaseSensitiveParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def case_sensitive_params( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._case_sensitive_params_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._case_sensitive_params_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi deleted file mode 100644 index edcd028d8bd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_case_sensitive_params/put.pyi +++ /dev/null @@ -1,275 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params -SomeVarSchema = schemas.StrSchema -SomeVarSchema = schemas.StrSchema -SomeVarSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'someVar': typing.Union[SomeVarSchema, str, ], - 'SomeVar': typing.Union[SomeVarSchema, str, ], - 'some_var': typing.Union[SomeVarSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_some_var = api_client.QueryParameter( - name="someVar", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) -request_query_some_var2 = api_client.QueryParameter( - name="SomeVar", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) -request_query_some_var3 = api_client.QueryParameter( - name="some_var", - style=api_client.ParameterStyle.FORM, - schema=SomeVarSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _case_sensitive_params_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _case_sensitive_params_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_some_var, - request_query_some_var2, - request_query_some_var3, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CaseSensitiveParams(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def case_sensitive_params( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def case_sensitive_params( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._case_sensitive_params_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._case_sensitive_params_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/__init__.py deleted file mode 100644 index d162dcc8f69..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_classname_test import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_CLASSNAME_TEST \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py deleted file mode 100644 index 6a8ea9a94ed..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.py +++ /dev/null @@ -1,337 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'api_key_query', -] -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test class name in snake case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Classname(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._classname_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._classname_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi deleted file mode 100644 index 63a2d59889a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_classname_test/patch.pyi +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.client import Client - -# body param -SchemaForRequestBodyApplicationJson = Client - - -request_body_client = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Client - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _classname_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - To test class name in snake case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_client.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Classname(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def classname( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._classname_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._classname_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/__init__.py deleted file mode 100644 index 810d63883b8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_delete_coffee_id import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_DELETE_COFFEE_ID \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py deleted file mode 100644 index 06cf3e572a2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.py +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Path params -IdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'id': typing.Union[IdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_id = api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=IdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -XRateLimitSchema = schemas.DecimalSchema -x_rate_limit_parameter = api_client.HeaderParameter( - name="X-Rate-Limit", - style=api_client.ParameterStyle.SIMPLE, - schema=XRateLimitSchema, -) -ResponseHeadersFor202 = typing_extensions.TypedDict( - 'ResponseHeadersFor202', - { - 'X-Rate-Limit': XRateLimitSchema, - } -) - - -@dataclass -class ApiResponseFor202(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor202 - body: schemas.Unset = schemas.unset - - -_response_for_202 = api_client.OpenApiResponse( - response_cls=ApiResponseFor202, - headers=[ - x_rate_limit_parameter, - ] -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - '200': _response_for_200, - '202': _response_for_202, - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_coffee_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete coffee - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCoffee(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_coffee( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_coffee_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_coffee_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi deleted file mode 100644 index 6602fe99aa6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_delete_coffee_id/delete.pyi +++ /dev/null @@ -1,305 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Path params -IdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'id': typing.Union[IdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_id = api_client.PathParameter( - name="id", - style=api_client.ParameterStyle.SIMPLE, - schema=IdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -XRateLimitSchema = schemas.DecimalSchema -ResponseHeadersFor202 = typing_extensions.TypedDict( - 'ResponseHeadersFor202', - { - 'X-Rate-Limit': XRateLimitSchema, - } -) - - -@dataclass -class ApiResponseFor202(api_client.ApiResponse): - response: urllib3.HTTPResponse - headers: ResponseHeadersFor202 - body: schemas.Unset = schemas.unset - - -_response_for_202 = api_client.OpenApiResponse( - response_cls=ApiResponseFor202, - headers=[ - x_rate_limit_parameter, - ] -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def _delete_coffee_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_coffee_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete coffee - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteCoffee(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete_coffee( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_coffee( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_coffee_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - ApiResponseFor202, - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_coffee_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/__init__.py deleted file mode 100644 index d113dc832c1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_health import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_HEALTH \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py deleted file mode 100644 index 2875b270fa9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.py +++ /dev/null @@ -1,239 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.health_check_result import HealthCheckResult - -from . import path - -SchemaFor200ResponseBodyApplicationJson = HealthCheckResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _fake_health_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Health check endpoint - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FakeHealthGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def fake_health_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fake_health_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fake_health_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi deleted file mode 100644 index bf79bef82cf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_health/get.pyi +++ /dev/null @@ -1,234 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.health_check_result import HealthCheckResult - -SchemaFor200ResponseBodyApplicationJson = HealthCheckResult - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _fake_health_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _fake_health_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Health check endpoint - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FakeHealthGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def fake_health_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def fake_health_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fake_health_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._fake_health_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/__init__.py deleted file mode 100644 index 4f2ec020c5b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_inline_additional_properties import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_INLINEADDITIONAL_PROPERTIES \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py deleted file mode 100644 index eacced100b5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_request_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - test inline additionalProperties - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_request_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class InlineAdditionalProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_additional_properties_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_additional_properties_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi deleted file mode 100644 index 8cd14929f0f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_additional_properties/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.StrSchema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, str, ], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -request_body_request_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _inline_additional_properties_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - test inline additionalProperties - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_request_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class InlineAdditionalProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def inline_additional_properties( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_additional_properties_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_additional_properties_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/__init__.py deleted file mode 100644 index b3a8a011277..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_inline_composition_ import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_INLINE_COMPOSITION_ \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py deleted file mode 100644 index 91df2c90f1a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.py +++ /dev/null @@ -1,855 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params - - -class CompositionAtRootSchema( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CompositionAtRootSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class CompositionInPropertySchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CompositionInPropertySchema': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'compositionAtRoot': typing.Union[CompositionAtRootSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - 'compositionInProperty': typing.Union[CompositionInPropertySchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_composition_at_root = api_client.QueryParameter( - name="compositionAtRoot", - style=api_client.ParameterStyle.FORM, - schema=CompositionAtRootSchema, - explode=True, -) -request_query_composition_in_property = api_client.QueryParameter( - name="compositionInProperty", - style=api_client.ParameterStyle.FORM, - schema=CompositionInPropertySchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - -request_body_any_type = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class SchemaFor200ResponseBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - - - class MetaOapg: - min_length = 1 - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyMultipartFormData': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - SchemaFor200ResponseBodyMultipartFormData, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - 'multipart/form-data': api_client.MediaType( - schema=SchemaFor200ResponseBodyMultipartFormData), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', - 'multipart/form-data', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_composition_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _inline_composition_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _inline_composition_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - testing composed schemas at inline locations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_composition_at_root, - request_query_composition_in_property, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_any_type.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class InlineComposition(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def inline_composition( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_composition( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_composition( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def inline_composition( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def inline_composition( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def inline_composition( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_composition_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_composition_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi deleted file mode 100644 index 1492f6b64a8..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_inline_composition_/post.pyi +++ /dev/null @@ -1,832 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params - - -class CompositionAtRootSchema( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CompositionAtRootSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class CompositionInPropertySchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'CompositionInPropertySchema': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'compositionAtRoot': typing.Union[CompositionAtRootSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - 'compositionInProperty': typing.Union[CompositionInPropertySchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_composition_at_root = api_client.QueryParameter( - name="compositionAtRoot", - style=api_client.ParameterStyle.FORM, - schema=CompositionAtRootSchema, - explode=True, -) -request_query_composition_in_property = api_client.QueryParameter( - name="compositionInProperty", - style=api_client.ParameterStyle.FORM, - schema=CompositionInPropertySchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - -request_body_any_type = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ComposedSchema, -): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -class SchemaFor200ResponseBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class someProp( - schemas.ComposedSchema, - ): - - - class MetaOapg: - - - class all_of_0( - schemas.StrSchema - ): - pass - - @classmethod - @functools.lru_cache() - def all_of(cls): - # we need this here to make our import statements work - # we must store _composed_schemas in here so the code is only run - # when we invoke this method. If we kept this at the class - # level we would get an error because the class level - # code would be run when this module is imported, and these composed - # classes don't exist yet because their module has not finished - # loading - return [ - cls.all_of_0, - ] - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'someProp': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - __annotations__ = { - "someProp": someProp, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["someProp"]) -> MetaOapg.properties.someProp: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["someProp"]) -> typing.Union[MetaOapg.properties.someProp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["someProp", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - someProp: typing.Union[MetaOapg.properties.someProp, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor200ResponseBodyMultipartFormData': - return super().__new__( - cls, - *_args, - someProp=someProp, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - SchemaFor200ResponseBodyMultipartFormData, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - 'multipart/form-data': api_client.MediaType( - schema=SchemaFor200ResponseBodyMultipartFormData), - }, -) -_all_accept_content_types = ( - 'application/json', - 'multipart/form-data', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _inline_composition_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _inline_composition_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _inline_composition_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _inline_composition_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - testing composed schemas at inline locations - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_composition_at_root, - request_query_composition_in_property, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_any_type.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class InlineComposition(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def inline_composition( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_composition( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def inline_composition( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def inline_composition( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def inline_composition( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def inline_composition( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_composition_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"], - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._inline_composition_oapg( - body=body, - query_params=query_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/__init__.py deleted file mode 100644 index e66fc387729..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_json_form_data import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_JSON_FORM_DATA \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py deleted file mode 100644 index 3ccf0eac8e1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.py +++ /dev/null @@ -1,364 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "param", - "param2", - } - - class properties: - param = schemas.StrSchema - param2 = schemas.StrSchema - __annotations__ = { - "param": param, - "param2": param2, - } - - param: MetaOapg.properties.param - param2: MetaOapg.properties.param2 - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param2"]) -> MetaOapg.properties.param2: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["param", "param2", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param2"]) -> MetaOapg.properties.param2: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["param", "param2", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - param: typing.Union[MetaOapg.properties.param, str, ], - param2: typing.Union[MetaOapg.properties.param2, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - param=param, - param2=param2, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _json_form_data_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_form_data_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_form_data_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - test json serialization of form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonFormData(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_form_data( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_form_data( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_form_data( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_form_data( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_form_data( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_form_data_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_form_data_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi deleted file mode 100644 index c9db50fba68..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_form_data/get.pyi +++ /dev/null @@ -1,359 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "param", - "param2", - } - - class properties: - param = schemas.StrSchema - param2 = schemas.StrSchema - __annotations__ = { - "param": param, - "param2": param2, - } - - param: MetaOapg.properties.param - param2: MetaOapg.properties.param2 - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["param2"]) -> MetaOapg.properties.param2: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["param", "param2", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param"]) -> MetaOapg.properties.param: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["param2"]) -> MetaOapg.properties.param2: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["param", "param2", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - param: typing.Union[MetaOapg.properties.param, str, ], - param2: typing.Union[MetaOapg.properties.param2, str, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - param=param, - param2=param2, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_form_data_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_form_data_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_form_data_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_form_data_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - test json serialization of form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonFormData(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_form_data( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_form_data( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_form_data( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_form_data( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_form_data( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_form_data_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_form_data_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/__init__.py deleted file mode 100644 index b302e74cceb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_json_patch import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_JSON_PATCH \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py deleted file mode 100644 index a6644e4413d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.py +++ /dev/null @@ -1,300 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.json_patch_request import JSONPatchRequest - -from . import path - -# body param -SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest - - -request_body_json_patch_request = api_client.RequestBody( - content={ - 'application/json-patch+json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonPatchjson), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _json_patch_oapg( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_patch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_patch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_patch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_patch_oapg( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - json patch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_json_patch_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonPatch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_patch( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_patch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_patch( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_patch_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_patch_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi deleted file mode 100644 index 0199f31ca69..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_patch/patch.pyi +++ /dev/null @@ -1,295 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.json_patch_request import JSONPatchRequest - -# body param -SchemaForRequestBodyApplicationJsonPatchjson = JSONPatchRequest - - -request_body_json_patch_request = api_client.RequestBody( - content={ - 'application/json-patch+json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonPatchjson), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_patch_oapg( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_patch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_patch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_patch_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_patch_oapg( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - json patch - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_json_patch_request.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='patch'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonPatch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_patch( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_patch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_patch( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_patch_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpatch(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def patch( - self, - content_type: typing_extensions.Literal["application/json-patch+json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def patch( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def patch( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def patch( - self, - content_type: str = 'application/json-patch+json', - body: typing.Union[SchemaForRequestBodyApplicationJsonPatchjson, schemas.Unset] = schemas.unset, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_patch_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/__init__.py deleted file mode 100644 index 3adee6e9d67..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_json_with_charset import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_JSON_WITH_CHARSET \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py deleted file mode 100644 index 5e82e1fb637..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json; charset=utf-8': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonCharsetutf8), - }, -) -SchemaFor200ResponseBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJsonCharsetutf8, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json; charset=utf-8': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJsonCharsetutf8), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json; charset=utf-8', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_with_charset_oapg( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_with_charset_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_with_charset_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_with_charset_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_with_charset_oapg( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - json with charset tx and rx - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonWithCharset(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_with_charset( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_with_charset( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_with_charset( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_with_charset( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_with_charset( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_with_charset_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_with_charset_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi deleted file mode 100644 index 8a83a49e9dd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_json_with_charset/post.pyi +++ /dev/null @@ -1,323 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json; charset=utf-8': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJsonCharsetutf8), - }, -) -SchemaFor200ResponseBodyApplicationJsonCharsetutf8 = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJsonCharsetutf8, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json; charset=utf-8': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJsonCharsetutf8), - }, -) -_all_accept_content_types = ( - 'application/json; charset=utf-8', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _json_with_charset_oapg( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _json_with_charset_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _json_with_charset_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _json_with_charset_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _json_with_charset_oapg( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - json with charset tx and rx - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class JsonWithCharset(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def json_with_charset( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def json_with_charset( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def json_with_charset( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def json_with_charset( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def json_with_charset( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_with_charset_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json; charset=utf-8"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json; charset=utf-8', - body: typing.Union[SchemaForRequestBodyApplicationJsonCharsetutf8, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._json_with_charset_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/__init__.py deleted file mode 100644 index 758109e7c09..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_obj_in_query import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_OBJ_IN_QUERY \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py deleted file mode 100644 index 37ece8a5a78..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.py +++ /dev/null @@ -1,309 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params - - -class MapBeanSchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapBeanSchema': - return super().__new__( - cls, - *_args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi deleted file mode 100644 index 9eeca38c684..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_obj_in_query/get.pyi +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params - - -class MapBeanSchema( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - keyword = schemas.StrSchema - __annotations__ = { - "keyword": keyword, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["keyword"]) -> MetaOapg.properties.keyword: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["keyword"]) -> typing.Union[MetaOapg.properties.keyword, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["keyword", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - keyword: typing.Union[MetaOapg.properties.keyword, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'MapBeanSchema': - return super().__new__( - cls, - *_args, - keyword=keyword, - _configuration=_configuration, - **kwargs, - ) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, dict, frozendict.frozendict, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py deleted file mode 100644 index e82cc25a7d2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_ import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_PARAMETER_COLLISIONS_1_A_B_AB_SELF_AB_ \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py deleted file mode 100644 index b4b0263ae17..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.py +++ /dev/null @@ -1,665 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query__1 = api_client.QueryParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Model1Schema, - explode=True, -) -request_query_a_b = api_client.QueryParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -request_query_ab = api_client.QueryParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=AbSchema, - explode=True, -) -request_query__self = api_client.QueryParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=ModelSelfSchema, - explode=True, -) -request_query_a_b2 = api_client.QueryParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -# Header params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header__2 = api_client.HeaderParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Model1Schema, -) -request_header_a_b3 = api_client.HeaderParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, -) -request_header__self2 = api_client.HeaderParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelSelfSchema, -) -request_header_a_b4 = api_client.HeaderParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, -) -# Path params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__3 = api_client.PathParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Model1Schema, - required=True, -) -request_path_a_b5 = api_client.PathParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, - required=True, -) -request_path_ab2 = api_client.PathParameter( - name="Ab", - style=api_client.ParameterStyle.SIMPLE, - schema=AbSchema, - required=True, -) -request_path__self3 = api_client.PathParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelSelfSchema, - required=True, -) -request_path_a_b6 = api_client.PathParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, - required=True, -) -# Cookie params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredCookieParams = typing_extensions.TypedDict( - 'RequestRequiredCookieParams', - { - } -) -RequestOptionalCookieParams = typing_extensions.TypedDict( - 'RequestOptionalCookieParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): - pass - - -request_cookie__4 = api_client.CookieParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Model1Schema, - explode=True, -) -request_cookie_a_b7 = api_client.CookieParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -request_cookie_ab3 = api_client.CookieParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=AbSchema, - explode=True, -) -request_cookie__self4 = api_client.CookieParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=ModelSelfSchema, - explode=True, -) -request_cookie_a_b8 = api_client.CookieParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.AnyTypeSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _parameter_collisions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _parameter_collisions_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - parameter collision case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - self._verify_typed_dict_inputs_oapg(RequestCookieParams, cookie_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__3, - request_path_a_b5, - request_path_ab2, - request_path__self3, - request_path_a_b6, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query__1, - request_query_a_b, - request_query_ab, - request_query__self, - request_query_a_b2, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header__2, - request_header_a_b3, - request_header__self2, - request_header_a_b4, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ParameterCollisions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def parameter_collisions( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def parameter_collisions( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def parameter_collisions( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def parameter_collisions( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def parameter_collisions( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._parameter_collisions_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - cookie_params=cookie_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._parameter_collisions_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - cookie_params=cookie_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi deleted file mode 100644 index 2cce3169e58..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_parameter_collisions_1_a_b_ab_self_a_b_/post.pyi +++ /dev/null @@ -1,660 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query__1 = api_client.QueryParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Model1Schema, - explode=True, -) -request_query_a_b = api_client.QueryParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -request_query_ab = api_client.QueryParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=AbSchema, - explode=True, -) -request_query__self = api_client.QueryParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=ModelSelfSchema, - explode=True, -) -request_query_a_b2 = api_client.QueryParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -# Header params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header__2 = api_client.HeaderParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Model1Schema, -) -request_header_a_b3 = api_client.HeaderParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, -) -request_header__self2 = api_client.HeaderParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelSelfSchema, -) -request_header_a_b4 = api_client.HeaderParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, -) -# Path params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path__3 = api_client.PathParameter( - name="1", - style=api_client.ParameterStyle.SIMPLE, - schema=Model1Schema, - required=True, -) -request_path_a_b5 = api_client.PathParameter( - name="aB", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, - required=True, -) -request_path_ab2 = api_client.PathParameter( - name="Ab", - style=api_client.ParameterStyle.SIMPLE, - schema=AbSchema, - required=True, -) -request_path__self3 = api_client.PathParameter( - name="self", - style=api_client.ParameterStyle.SIMPLE, - schema=ModelSelfSchema, - required=True, -) -request_path_a_b6 = api_client.PathParameter( - name="A-B", - style=api_client.ParameterStyle.SIMPLE, - schema=ABSchema, - required=True, -) -# Cookie params -Model1Schema = schemas.StrSchema -ABSchema = schemas.StrSchema -AbSchema = schemas.StrSchema -ModelSelfSchema = schemas.StrSchema -ABSchema = schemas.StrSchema -RequestRequiredCookieParams = typing_extensions.TypedDict( - 'RequestRequiredCookieParams', - { - } -) -RequestOptionalCookieParams = typing_extensions.TypedDict( - 'RequestOptionalCookieParams', - { - '1': typing.Union[Model1Schema, str, ], - 'aB': typing.Union[ABSchema, str, ], - 'Ab': typing.Union[AbSchema, str, ], - 'self': typing.Union[ModelSelfSchema, str, ], - 'A-B': typing.Union[ABSchema, str, ], - }, - total=False -) - - -class RequestCookieParams(RequestRequiredCookieParams, RequestOptionalCookieParams): - pass - - -request_cookie__4 = api_client.CookieParameter( - name="1", - style=api_client.ParameterStyle.FORM, - schema=Model1Schema, - explode=True, -) -request_cookie_a_b7 = api_client.CookieParameter( - name="aB", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -request_cookie_ab3 = api_client.CookieParameter( - name="Ab", - style=api_client.ParameterStyle.FORM, - schema=AbSchema, - explode=True, -) -request_cookie__self4 = api_client.CookieParameter( - name="self", - style=api_client.ParameterStyle.FORM, - schema=ModelSelfSchema, - explode=True, -) -request_cookie_a_b8 = api_client.CookieParameter( - name="A-B", - style=api_client.ParameterStyle.FORM, - schema=ABSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.AnyTypeSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _parameter_collisions_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _parameter_collisions_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _parameter_collisions_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - parameter collision case - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - self._verify_typed_dict_inputs_oapg(RequestCookieParams, cookie_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path__3, - request_path_a_b5, - request_path_ab2, - request_path__self3, - request_path_a_b6, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query__1, - request_query_a_b, - request_query_ab, - request_query__self, - request_query_a_b2, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - for parameter in ( - request_header__2, - request_header_a_b3, - request_header__self2, - request_header_a_b4, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ParameterCollisions(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def parameter_collisions( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def parameter_collisions( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def parameter_collisions( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def parameter_collisions( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def parameter_collisions( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._parameter_collisions_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - cookie_params=cookie_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - cookie_params: RequestCookieParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._parameter_collisions_oapg( - body=body, - query_params=query_params, - header_params=header_params, - path_params=path_params, - cookie_params=cookie_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py deleted file mode 100644 index 5463e577692..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_pet_id_upload_image_with_required_file import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_PET_ID_UPLOAD_IMAGE_WITH_REQUIRED_FILE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py deleted file mode 100644 index a532d0121a7..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.py +++ /dev/null @@ -1,455 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -from . import path - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "requiredFile", - } - - class properties: - additionalMetadata = schemas.StrSchema - requiredFile = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "requiredFile": requiredFile, - } - - requiredFile: MetaOapg.properties.requiredFile - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requiredFile"]) -> MetaOapg.properties.requiredFile: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "requiredFile", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requiredFile"]) -> MetaOapg.properties.requiredFile: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "requiredFile", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - requiredFile: typing.Union[MetaOapg.properties.requiredFile, bytes, io.FileIO, io.BufferedReader, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - requiredFile=requiredFile, - additionalMetadata=additionalMetadata, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'petstore_auth', -] -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_file_with_required_file_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads an image (required) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFileWithRequiredFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_file_with_required_file( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_file_with_required_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_file_with_required_file( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_with_required_file_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_with_required_file_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi deleted file mode 100644 index 2ce97ae9dd9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_pet_id_upload_image_with_required_file/post.pyi +++ /dev/null @@ -1,447 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "requiredFile", - } - - class properties: - additionalMetadata = schemas.StrSchema - requiredFile = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "requiredFile": requiredFile, - } - - requiredFile: MetaOapg.properties.requiredFile - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["requiredFile"]) -> MetaOapg.properties.requiredFile: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "requiredFile", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["requiredFile"]) -> MetaOapg.properties.requiredFile: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "requiredFile", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - requiredFile: typing.Union[MetaOapg.properties.requiredFile, bytes, io.FileIO, io.BufferedReader, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - requiredFile=requiredFile, - additionalMetadata=additionalMetadata, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_file_with_required_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_file_with_required_file_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads an image (required) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFileWithRequiredFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_file_with_required_file( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_file_with_required_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_file_with_required_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_file_with_required_file( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_with_required_file_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_with_required_file_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py deleted file mode 100644 index d6a09bc162b..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_query_param_with_json_content_type import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_QUERY_PARAM_WITH_JSON_CONTENT_TYPE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py deleted file mode 100644 index 13d27a1f351..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.py +++ /dev/null @@ -1,292 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params -SchemaForRequestParameterSomeParamApplicationJson = schemas.AnyTypeSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'someParam': typing.Union[SchemaForRequestParameterSomeParamApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_some_param = api_client.QueryParameter( - name="someParam", - content={ - "application/json": SchemaForRequestParameterSomeParamApplicationJson, - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - query param with json content-type - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_some_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class QueryParamWithJsonContentType(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_param_with_json_content_type( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_param_with_json_content_type_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_param_with_json_content_type_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi deleted file mode 100644 index 9ae7ba171b5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_query_param_with_json_content_type/get.pyi +++ /dev/null @@ -1,287 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params -SchemaForRequestParameterSomeParamApplicationJson = schemas.AnyTypeSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'someParam': typing.Union[SchemaForRequestParameterSomeParamApplicationJson, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_some_param = api_client.QueryParameter( - name="someParam", - content={ - "application/json": SchemaForRequestParameterSomeParamApplicationJson, - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.AnyTypeSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_param_with_json_content_type_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - query param with json content-type - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_some_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class QueryParamWithJsonContentType(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_param_with_json_content_type( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_param_with_json_content_type( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_param_with_json_content_type_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_param_with_json_content_type_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/__init__.py deleted file mode 100644 index f14640328a9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_ref_obj_in_query import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REF_OBJ_IN_QUERY \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py deleted file mode 100644 index 64987f350bf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - -from . import path - -# Query params -MapBeanSchema = Foo -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _ref_object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RefObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def ref_object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ref_object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ref_object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi deleted file mode 100644 index abdca20c729..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_ref_obj_in_query/get.pyi +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - -# Query params -MapBeanSchema = Foo -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mapBean': typing.Union[MapBeanSchema, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_map_bean = api_client.QueryParameter( - name="mapBean", - style=api_client.ParameterStyle.DEEP_OBJECT, - schema=MapBeanSchema, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _ref_object_in_query_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _ref_object_in_query_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - user list - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_map_bean, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class RefObjectInQuery(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def ref_object_in_query( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def ref_object_in_query( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ref_object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._ref_object_in_query_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/__init__.py deleted file mode 100644 index 59f3e61b17d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_array_of_enums import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_ARRAYOFENUMS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py deleted file mode 100644 index 2894d829ebd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.py +++ /dev/null @@ -1,330 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.array_of_enums import ArrayOfEnums - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ArrayOfEnums - - -request_body_array_of_enums = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ArrayOfEnums - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_of_enums_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _array_of_enums_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _array_of_enums_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_array_of_enums.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def array_of_enums( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def array_of_enums( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi deleted file mode 100644 index 24206b9a2e6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_array_of_enums/post.pyi +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.array_of_enums import ArrayOfEnums - -# body param -SchemaForRequestBodyApplicationJson = ArrayOfEnums - - -request_body_array_of_enums = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ArrayOfEnums - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_of_enums_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _array_of_enums_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _array_of_enums_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _array_of_enums_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Array of Enums - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_array_of_enums.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArrayOfEnums(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def array_of_enums( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def array_of_enums( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def array_of_enums( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def array_of_enums( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_of_enums_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/__init__.py deleted file mode 100644 index c90c7330633..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_arraymodel import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_ARRAYMODEL \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py deleted file mode 100644 index e42a1889d5c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.animal_farm import AnimalFarm - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = AnimalFarm - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = AnimalFarm - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_model_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _array_model_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _array_model_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _array_model_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _array_model_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArrayModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def array_model( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def array_model( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def array_model( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def array_model( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def array_model( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi deleted file mode 100644 index a2b06a441a2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_arraymodel/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.animal_farm import AnimalFarm - -# body param -SchemaForRequestBodyApplicationJson = AnimalFarm - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = AnimalFarm - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _array_model_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _array_model_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _array_model_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _array_model_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _array_model_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ArrayModel(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def array_model( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def array_model( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def array_model( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def array_model( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def array_model( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._array_model_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/__init__.py deleted file mode 100644 index 0c4592391c5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_boolean import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_BOOLEAN \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py deleted file mode 100644 index 2baae62355e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _boolean_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _boolean_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _boolean_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _boolean_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _boolean_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Boolean(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def boolean( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def boolean( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def boolean( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def boolean( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def boolean( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._boolean_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._boolean_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi deleted file mode 100644 index 0050c5cb872..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_boolean/post.pyi +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.BoolSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.BoolSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _boolean_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _boolean_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _boolean_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _boolean_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _boolean_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Boolean(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def boolean( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def boolean( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def boolean( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def boolean( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def boolean( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._boolean_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, bool, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._boolean_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py deleted file mode 100644 index 0d1296a31b0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_composed_one_of_number_with_validations import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_COMPOSED_ONE_OF_NUMBER_WITH_VALIDATIONS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py deleted file mode 100644 index 6bd2dd9456d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ComposedOneOfDifferentTypes - - -request_body_composed_one_of_different_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ComposedOneOfDifferentTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _composed_one_of_different_types_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_composed_one_of_different_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ComposedOneOfDifferentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def composed_one_of_different_types( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def composed_one_of_different_types( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def composed_one_of_different_types( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def composed_one_of_different_types( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def composed_one_of_different_types( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._composed_one_of_different_types_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._composed_one_of_different_types_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi deleted file mode 100644 index 0aa5907b063..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_composed_one_of_number_with_validations/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes - -# body param -SchemaForRequestBodyApplicationJson = ComposedOneOfDifferentTypes - - -request_body_composed_one_of_different_types = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ComposedOneOfDifferentTypes - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _composed_one_of_different_types_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _composed_one_of_different_types_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_composed_one_of_different_types.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ComposedOneOfDifferentTypes(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def composed_one_of_different_types( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def composed_one_of_different_types( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def composed_one_of_different_types( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def composed_one_of_different_types( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def composed_one_of_different_types( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._composed_one_of_different_types_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._composed_one_of_different_types_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/__init__.py deleted file mode 100644 index f383b115070..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_enum import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_ENUM \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py deleted file mode 100644 index 6cc35c14821..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_enum import StringEnum - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = StringEnum - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = StringEnum - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string_enum_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _string_enum_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _string_enum_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _string_enum_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _string_enum_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StringEnum(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def string_enum( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def string_enum( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def string_enum( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def string_enum( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def string_enum( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_enum_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_enum_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi deleted file mode 100644 index 221b4d0b639..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_enum/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_enum import StringEnum - -# body param -SchemaForRequestBodyApplicationJson = StringEnum - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = StringEnum - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string_enum_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _string_enum_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _string_enum_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _string_enum_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _string_enum_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class StringEnum(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def string_enum( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def string_enum( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def string_enum( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def string_enum( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def string_enum( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_enum_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_enum_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/__init__.py deleted file mode 100644 index 8714057f419..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_mammal import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_MAMMAL \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py deleted file mode 100644 index e7e13243f96..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.py +++ /dev/null @@ -1,332 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.mammal import Mammal - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Mammal - - -request_body_mammal = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Mammal - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_mammal.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Mammal(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mammal_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mammal_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi deleted file mode 100644 index 6ea8a6d19aa..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_mammal/post.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.mammal import Mammal - -# body param -SchemaForRequestBodyApplicationJson = Mammal - - -request_body_mammal = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = Mammal - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _mammal_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_mammal.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class Mammal(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def mammal( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mammal_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._mammal_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/__init__.py deleted file mode 100644 index 7ca1c08dff0..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_number import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_NUMBER \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py deleted file mode 100644 index ec018264aae..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.number_with_validations import NumberWithValidations - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = NumberWithValidations - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = NumberWithValidations - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _number_with_validations_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _number_with_validations_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _number_with_validations_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _number_with_validations_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _number_with_validations_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class NumberWithValidations(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def number_with_validations( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def number_with_validations( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def number_with_validations( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def number_with_validations( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def number_with_validations( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._number_with_validations_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._number_with_validations_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi deleted file mode 100644 index c61052f767d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_number/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.number_with_validations import NumberWithValidations - -# body param -SchemaForRequestBodyApplicationJson = NumberWithValidations - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = NumberWithValidations - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _number_with_validations_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _number_with_validations_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _number_with_validations_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _number_with_validations_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _number_with_validations_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class NumberWithValidations(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def number_with_validations( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def number_with_validations( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def number_with_validations( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def number_with_validations( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def number_with_validations( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._number_with_validations_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._number_with_validations_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py deleted file mode 100644 index 75f23321286..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_object_model_with_ref_props import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_OBJECT_MODEL_WITH_REF_PROPS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py deleted file mode 100644 index cbea3511256..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.py +++ /dev/null @@ -1,329 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = ObjectModelWithRefProps - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ObjectModelWithRefProps - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_model_with_ref_props_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ObjectModelWithRefProps(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_model_with_ref_props( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_model_with_ref_props( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def object_model_with_ref_props( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_model_with_ref_props( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_model_with_ref_props( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_model_with_ref_props_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_model_with_ref_props_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi deleted file mode 100644 index 68fd4a90f65..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_object_model_with_ref_props/post.pyi +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps - -# body param -SchemaForRequestBodyApplicationJson = ObjectModelWithRefProps - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = ObjectModelWithRefProps - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _object_model_with_ref_props_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _object_model_with_ref_props_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ObjectModelWithRefProps(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def object_model_with_ref_props( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def object_model_with_ref_props( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def object_model_with_ref_props( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def object_model_with_ref_props( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def object_model_with_ref_props( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_model_with_ref_props_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._object_model_with_ref_props_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/__init__.py deleted file mode 100644 index 5f3cba3f0c9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_refs_string import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_REFS_STRING \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py deleted file mode 100644 index 14757e3972f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _string_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _string_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _string_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _string_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class String(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def string( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def string( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def string( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def string( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def string( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi deleted file mode 100644 index 789db0c1a2a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_refs_string/post.pyi +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _string_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _string_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _string_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _string_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _string_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class String(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def string( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def string( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def string( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def string( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def string( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._string_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/__init__.py deleted file mode 100644 index 52d9f34614f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_response_without_schema import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_RESPONSE_WITHOUT_SCHEMA \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py deleted file mode 100644 index c488bce612e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.py +++ /dev/null @@ -1,238 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - schemas.Unset, - schemas.Unset, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType(), - 'application/xml': api_client.MediaType(), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', - 'application/xml', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _response_without_schema_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - receives a response without schema - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ResponseWithoutSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def response_without_schema( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._response_without_schema_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._response_without_schema_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi deleted file mode 100644 index 008429c2b59..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_response_without_schema/get.pyi +++ /dev/null @@ -1,233 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - schemas.Unset, - schemas.Unset, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType(), - 'application/xml': api_client.MediaType(), - }, -) -_all_accept_content_types = ( - 'application/json', - 'application/xml', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _response_without_schema_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _response_without_schema_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - receives a response without schema - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class ResponseWithoutSchema(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def response_without_schema( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def response_without_schema( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._response_without_schema_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._response_without_schema_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py deleted file mode 100644 index 82abd0ac65e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_test_query_parameters import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_TESTQUERYPARAMETERS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py deleted file mode 100644 index aac0cf90591..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.py +++ /dev/null @@ -1,419 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_with_validation import StringWithValidation - -from . import path - -# Query params - - -class PipeSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PipeSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class IoutilSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'IoutilSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class HttpSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'HttpSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class UrlSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'UrlSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class ContextSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ContextSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RefParamSchema = StringWithValidation -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'pipe': typing.Union[PipeSchema, list, tuple, ], - 'ioutil': typing.Union[IoutilSchema, list, tuple, ], - 'http': typing.Union[HttpSchema, list, tuple, ], - 'url': typing.Union[UrlSchema, list, tuple, ], - 'context': typing.Union[ContextSchema, list, tuple, ], - 'refParam': typing.Union[RefParamSchema, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_pipe = api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=PipeSchema, - required=True, - explode=True, -) -request_query_ioutil = api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=IoutilSchema, - required=True, -) -request_query_http = api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=HttpSchema, - required=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - required=True, -) -request_query_context = api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=ContextSchema, - required=True, - explode=True, -) -request_query_ref_param = api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=RefParamSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_pipe, - request_query_ioutil, - request_query_http, - request_query_url, - request_query_context, - request_query_ref_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class QueryParameterCollectionFormat(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_parameter_collection_format( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi deleted file mode 100644 index 088f67d331a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_test_query_parameters/put.pyi +++ /dev/null @@ -1,414 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.string_with_validation import StringWithValidation - -# Query params - - -class PipeSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'PipeSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class IoutilSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'IoutilSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class HttpSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'HttpSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class UrlSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'UrlSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -class ContextSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'ContextSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RefParamSchema = StringWithValidation -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'pipe': typing.Union[PipeSchema, list, tuple, ], - 'ioutil': typing.Union[IoutilSchema, list, tuple, ], - 'http': typing.Union[HttpSchema, list, tuple, ], - 'url': typing.Union[UrlSchema, list, tuple, ], - 'context': typing.Union[ContextSchema, list, tuple, ], - 'refParam': typing.Union[RefParamSchema, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_pipe = api_client.QueryParameter( - name="pipe", - style=api_client.ParameterStyle.FORM, - schema=PipeSchema, - required=True, - explode=True, -) -request_query_ioutil = api_client.QueryParameter( - name="ioutil", - style=api_client.ParameterStyle.FORM, - schema=IoutilSchema, - required=True, -) -request_query_http = api_client.QueryParameter( - name="http", - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=HttpSchema, - required=True, -) -request_query_url = api_client.QueryParameter( - name="url", - style=api_client.ParameterStyle.FORM, - schema=UrlSchema, - required=True, -) -request_query_context = api_client.QueryParameter( - name="context", - style=api_client.ParameterStyle.FORM, - schema=ContextSchema, - required=True, - explode=True, -) -request_query_ref_param = api_client.QueryParameter( - name="refParam", - style=api_client.ParameterStyle.FORM, - schema=RefParamSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _query_parameter_collection_format_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_pipe, - request_query_ioutil, - request_query_http, - request_query_url, - request_query_context, - request_query_ref_param, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class QueryParameterCollectionFormat(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def query_parameter_collection_format( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def query_parameter_collection_format( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._query_parameter_collection_format_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/__init__.py deleted file mode 100644 index b7321672f11..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_upload_download_file import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_UPLOAD_DOWNLOAD_FILE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py deleted file mode 100644 index 174a4b2e916..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.py +++ /dev/null @@ -1,331 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# body param -SchemaForRequestBodyApplicationOctetStream = schemas.BinarySchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaForRequestBodyApplicationOctetStream), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads a file and downloads a file using application/octet-stream - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadDownloadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_download_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_download_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi deleted file mode 100644 index 1759d975a6c..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_download_file/post.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# body param -SchemaForRequestBodyApplicationOctetStream = schemas.BinarySchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaForRequestBodyApplicationOctetStream), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_download_file_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads a file and downloads a file using application/octet-stream - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadDownloadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_download_file( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_download_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: typing_extensions.Literal["application/octet-stream"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationOctetStream,bytes, io.FileIO, io.BufferedReader, ], - content_type: str = 'application/octet-stream', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_download_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/__init__.py deleted file mode 100644 index 3f4bf5709f3..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_upload_file import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_UPLOAD_FILE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py deleted file mode 100644 index 3c286bcf958..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.py +++ /dev/null @@ -1,394 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -from . import path - -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "file", - } - - class properties: - additionalMetadata = schemas.StrSchema - file = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "file": file, - } - - file: MetaOapg.properties.file - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - additionalMetadata=additionalMetadata, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_file_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads a file using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_file( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_file( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi deleted file mode 100644 index ede3be6b8a6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_file/post.pyi +++ /dev/null @@ -1,389 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - required = { - "file", - } - - class properties: - additionalMetadata = schemas.StrSchema - file = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "file": file, - } - - file: MetaOapg.properties.file - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - additionalMetadata=additionalMetadata, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_file_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_file_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_file_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_file_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads a file using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFile(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_file( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_file( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_file( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_file( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_file_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/__init__.py deleted file mode 100644 index 20c593a329a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.fake_upload_files import Api - -from petstore_api.paths import PathValues - -path = PathValues.FAKE_UPLOAD_FILES \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py deleted file mode 100644 index 3f1e0405e55..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.py +++ /dev/null @@ -1,401 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -from . import path - -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class files( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.BinarySchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'files': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "files": files, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["files"]) -> MetaOapg.properties.files: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["files", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["files", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - files=files, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_files_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_files_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_files_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads files using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFiles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_files( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_files( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_files( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_files_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_files_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi deleted file mode 100644 index 985e5f7be29..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/fake_upload_files/post.pyi +++ /dev/null @@ -1,396 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - - class files( - schemas.ListSchema - ): - - - class MetaOapg: - items = schemas.BinarySchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]], typing.List[typing.Union[MetaOapg.items, bytes, io.FileIO, io.BufferedReader, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'files': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - __annotations__ = { - "files": files, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["files"]) -> MetaOapg.properties.files: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["files", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["files"]) -> typing.Union[MetaOapg.properties.files, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["files", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - files: typing.Union[MetaOapg.properties.files, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - files=files, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_files_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_files_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_files_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_files_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads files using multipart/form-data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadFiles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_files( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_files( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_files( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_files( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_files_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_files_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/__init__.py deleted file mode 100644 index e7bea652ad4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.foo import Api - -from petstore_api.paths import PathValues - -path = PathValues.FOO \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py deleted file mode 100644 index 1e47032f220..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.py +++ /dev/null @@ -1,294 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - -from . import path - - - -class SchemaFor0ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - @staticmethod - def string() -> typing.Type['Foo']: - return Foo - __annotations__ = { - "string": string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> 'Foo': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union['Foo', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - string: typing.Union['Foo', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor0ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - string=string, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - 'default': _response_for_default, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _foo_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FooGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def foo_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi deleted file mode 100644 index 4cdef988684..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/foo/get.pyi +++ /dev/null @@ -1,289 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.foo import Foo - - - -class SchemaFor0ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - - @staticmethod - def string() -> typing.Type['Foo']: - return Foo - __annotations__ = { - "string": string, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["string"]) -> 'Foo': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["string"]) -> typing.Union['Foo', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["string", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - string: typing.Union['Foo', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaFor0ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - string=string, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor0ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor0ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _foo_get_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _foo_get_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FooGet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def foo_get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def foo_get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._foo_get_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/__init__.py deleted file mode 100644 index a52ddaccdbb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.pet import Api - -from petstore_api.paths import PathValues - -path = PathValues.PET \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py deleted file mode 100644 index 0bad1ac3eac..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.py +++ /dev/null @@ -1,393 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Pet -SchemaForRequestBodyApplicationXml = Pet - - -request_body_pet = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'application/xml': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXml), - }, - required=True, -) -_auth = [ - 'petstore_auth', - 'http_signature_test', -] -_servers = ( - { - 'url': "https://petstore.swagger.io/v2", - 'description': "No description provided", - }, - { - 'url': "https://path-server-test.petstore.local/v2", - 'description': "No description provided", - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) -_status_code_to_response = { - '200': _response_for_200, - '405': _response_for_405, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new pet to the store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_pet.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - host = self._get_host_oapg('add_pet', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddPet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi deleted file mode 100644 index b42118a94c6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/post.pyi +++ /dev/null @@ -1,373 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# body param -SchemaForRequestBodyApplicationJson = Pet -SchemaForRequestBodyApplicationXml = Pet - - -request_body_pet = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'application/xml': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXml), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Add a new pet to the store - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_pet.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - host = self._get_host_oapg('add_pet', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class AddPet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py deleted file mode 100644 index c700a477c00..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.py +++ /dev/null @@ -1,376 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Pet -SchemaForRequestBodyApplicationXml = Pet - - -request_body_pet = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'application/xml': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXml), - }, - required=True, -) -_auth = [ - 'petstore_auth', - 'http_signature_test', -] -_servers = ( - { - 'url': "https://petstore.swagger.io/v2", - 'description': "No description provided", - }, - { - 'url': "https://path-server-test.petstore.local/v2", - 'description': "No description provided", - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) -_status_code_to_response = { - '400': _response_for_400, - '404': _response_for_404, - '405': _response_for_405, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an existing pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_pet.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - host = self._get_host_oapg('update_pet', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi deleted file mode 100644 index fbea6f42af3..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet/put.pyi +++ /dev/null @@ -1,355 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# body param -SchemaForRequestBodyApplicationJson = Pet -SchemaForRequestBodyApplicationXml = Pet - - -request_body_pet = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - 'application/xml': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXml), - }, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_pet_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Update an existing pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_pet.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - host = self._get_host_oapg('update_pet', _servers, host_index) - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - host=host, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_pet( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationXml,], - content_type: typing_extensions.Literal["application/xml"], - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = ..., - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXml,], - content_type: str = 'application/json', - host_index: typing.Optional[int] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_oapg( - body=body, - content_type=content_type, - host_index=host_index, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/__init__.py deleted file mode 100644 index f0f9ca9ac2e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.pet_find_by_status import Api - -from petstore_api.paths import PathValues - -path = PathValues.PET_FIND_BY_STATUS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py deleted file mode 100644 index 4e9d9acf765..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.py +++ /dev/null @@ -1,413 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# Query params - - -class StatusSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - - class MetaOapg: - enum_value_to_name = { - "available": "AVAILABLE", - "pending": "PENDING", - "sold": "SOLD", - } - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StatusSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'status': typing.Union[StatusSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_status = api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=StatusSchema, - required=True, -) -_auth = [ - 'petstore_auth', - 'http_signature_test', -] - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_status, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPetsByStatus(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_status( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi deleted file mode 100644 index b155bb61f74..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_status/get.pyi +++ /dev/null @@ -1,395 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# Query params - - -class StatusSchema( - schemas.ListSchema -): - - - class MetaOapg: - - - class items( - schemas.EnumBase, - schemas.StrSchema - ): - - @schemas.classproperty - def AVAILABLE(cls): - return cls("available") - - @schemas.classproperty - def PENDING(cls): - return cls("pending") - - @schemas.classproperty - def SOLD(cls): - return cls("sold") - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'StatusSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'status': typing.Union[StatusSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_status = api_client.QueryParameter( - name="status", - style=api_client.ParameterStyle.FORM, - schema=StatusSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_status_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_status, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPetsByStatus(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_status( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_status( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_status_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/__init__.py deleted file mode 100644 index 55063b645ec..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.pet_find_by_tags import Api - -from petstore_api.paths import PathValues - -path = PathValues.PET_FIND_BY_TAGS \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py deleted file mode 100644 index fd4e8cceae2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.py +++ /dev/null @@ -1,388 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# Query params - - -class TagsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'TagsSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'tags': typing.Union[TagsSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_tags = api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=TagsSchema, - required=True, -) -_auth = [ - 'petstore_auth', - 'http_signature_test', -] - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_tags, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPetsByTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi deleted file mode 100644 index e383b274078..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_find_by_tags/get.pyi +++ /dev/null @@ -1,378 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# Query params - - -class TagsSchema( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.StrSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, str, ]], typing.List[typing.Union[MetaOapg.items, str, ]]], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'TagsSchema': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'tags': typing.Union[TagsSchema, list, tuple, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_tags = api_client.QueryParameter( - name="tags", - style=api_client.ParameterStyle.FORM, - schema=TagsSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationXml( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationXml': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['Pet']: - return Pet - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['Pet'], typing.List['Pet']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'Pet': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_pets_by_tags_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Finds Pets by tags - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_tags, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPetsByTags(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_pets_by_tags( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_pets_by_tags( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_pets_by_tags_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/__init__.py deleted file mode 100644 index b165f841464..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.pet_pet_id import Api - -from petstore_api.paths import PathValues - -path = PathValues.PET_PET_ID \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py deleted file mode 100644 index 4f1fc57d6bf..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.py +++ /dev/null @@ -1,304 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Header params -ApiKeySchema = schemas.StrSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'api_key': typing.Union[ApiKeySchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_api_key = api_client.HeaderParameter( - name="api_key", - style=api_client.ParameterStyle.SIMPLE, - schema=ApiKeySchema, -) -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -_auth = [ - 'petstore_auth', -] - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '400': _response_for_400, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_pet_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Deletes a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_api_key, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeletePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete_pet( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_pet_oapg( - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_pet_oapg( - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi deleted file mode 100644 index bae37d55ea9..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/delete.pyi +++ /dev/null @@ -1,296 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Header params -ApiKeySchema = schemas.StrSchema -RequestRequiredHeaderParams = typing_extensions.TypedDict( - 'RequestRequiredHeaderParams', - { - } -) -RequestOptionalHeaderParams = typing_extensions.TypedDict( - 'RequestOptionalHeaderParams', - { - 'api_key': typing.Union[ApiKeySchema, str, ], - }, - total=False -) - - -class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): - pass - - -request_header_api_key = api_client.HeaderParameter( - name="api_key", - style=api_client.ParameterStyle.SIMPLE, - schema=ApiKeySchema, -) -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_pet_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_pet_oapg( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Deletes a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - for parameter in ( - request_header_api_key, - ): - parameter_data = header_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _headers.extend(serialized_data) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeletePet(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete_pet( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_pet( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_pet_oapg( - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - header_params: RequestHeaderParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_pet_oapg( - header_params=header_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py deleted file mode 100644 index f7816a024e4..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.py +++ /dev/null @@ -1,328 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -from . import path - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -_auth = [ - 'api_key', -] -SchemaFor200ResponseBodyApplicationXml = Pet -SchemaFor200ResponseBodyApplicationJson = Pet - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '404': _response_for_404, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_pet_by_id_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Find pet by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPetById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_pet_by_id( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_pet_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_pet_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi deleted file mode 100644 index fedba6a0610..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/get.pyi +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.pet import Pet - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = Pet -SchemaFor200ResponseBodyApplicationJson = Pet - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_pet_by_id_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_pet_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Find pet by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetPetById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_pet_by_id( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_pet_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_pet_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_pet_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py deleted file mode 100644 index 4e13d8387ea..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.py +++ /dev/null @@ -1,397 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - status = schemas.StrSchema - __annotations__ = { - "name": name, - "status": status, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "status", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "status", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - name=name, - status=status, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) -_auth = [ - 'petstore_auth', -] - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) -_status_code_to_response = { - '405': _response_for_405, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_with_form_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_pet_with_form_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Updates a pet in the store with form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePetWithForm(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_pet_with_form( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet_with_form( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_pet_with_form( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_with_form_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_with_form_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi deleted file mode 100644 index 5cbb4082d29..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id/post.pyi +++ /dev/null @@ -1,389 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyApplicationXWwwFormUrlencoded( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - name = schemas.StrSchema - status = schemas.StrSchema - __annotations__ = { - "name": name, - "status": status, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "status", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "status", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - status: typing.Union[MetaOapg.properties.status, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded': - return super().__new__( - cls, - *_args, - name=name, - status=status, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'application/x-www-form-urlencoded': api_client.MediaType( - schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), - }, -) - - -@dataclass -class ApiResponseFor405(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_405 = api_client.OpenApiResponse( - response_cls=ApiResponseFor405, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_with_form_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_pet_with_form_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_pet_with_form_oapg( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Updates a pet in the store with form data - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdatePetWithForm(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_pet_with_form( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet_with_form( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_pet_with_form( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_pet_with_form( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_with_form_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/x-www-form-urlencoded"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/x-www-form-urlencoded', - body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_pet_with_form_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/__init__.py deleted file mode 100644 index 6af43e84e11..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.pet_pet_id_upload_image import Api - -from petstore_api.paths import PathValues - -path = PathValues.PET_PET_ID_UPLOAD_IMAGE \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py deleted file mode 100644 index 967a3f1cfc5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.py +++ /dev/null @@ -1,450 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -from . import path - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - additionalMetadata = schemas.StrSchema - file = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - additionalMetadata=additionalMetadata, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'petstore_auth', -] -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_image_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_image_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_image_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads an image - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadImage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_image( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_image( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_image( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_image_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_image_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi deleted file mode 100644 index c6e9baa0d0a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/pet_pet_id_upload_image/post.pyi +++ /dev/null @@ -1,442 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.api_response import ApiResponse - -# Path params -PetIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'petId': typing.Union[PetIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_pet_id = api_client.PathParameter( - name="petId", - style=api_client.ParameterStyle.SIMPLE, - schema=PetIdSchema, - required=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - additionalMetadata = schemas.StrSchema - file = schemas.BinarySchema - __annotations__ = { - "additionalMetadata": additionalMetadata, - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["additionalMetadata"]) -> MetaOapg.properties.additionalMetadata: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["additionalMetadata"]) -> typing.Union[MetaOapg.properties.additionalMetadata, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["additionalMetadata", "file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - additionalMetadata: typing.Union[MetaOapg.properties.additionalMetadata, str, schemas.Unset] = schemas.unset, - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - additionalMetadata=additionalMetadata, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -SchemaFor200ResponseBodyApplicationJson = ApiResponse - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _upload_image_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _upload_image_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _upload_image_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _upload_image_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - uploads an image - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_pet_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UploadImage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def upload_image( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def upload_image( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def upload_image( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def upload_image( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_image_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._upload_image_oapg( - body=body, - path_params=path_params, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/__init__.py deleted file mode 100644 index 265c07e7bbb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.store_inventory import Api - -from petstore_api.paths import PathValues - -path = PathValues.STORE_INVENTORY \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py deleted file mode 100644 index 6d9149b1d91..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -_auth = [ - 'api_key', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.Int32Schema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_inventory_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Returns pet inventories by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetInventory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_inventory( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi deleted file mode 100644 index ec2b0fd1499..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_inventory/get.pyi +++ /dev/null @@ -1,261 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.DictSchema -): - - - class MetaOapg: - additional_properties = schemas.Int32Schema - - def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - # dict_instance[name] accessor - return super().__getitem__(name) - - def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: - return super().get_item_oapg(name) - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[MetaOapg.additional_properties, decimal.Decimal, int, ], - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - **kwargs, - ) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_inventory_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_inventory_oapg( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Returns pet inventories by status - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetInventory(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_inventory( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_inventory( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_inventory_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/__init__.py deleted file mode 100644 index 2cefcb1299a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.store_order import Api - -from petstore_api.paths import PathValues - -path = PathValues.STORE_ORDER \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py deleted file mode 100644 index d0b0ddb2402..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.py +++ /dev/null @@ -1,351 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.order import Order - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = Order - - -request_body_order = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = Order -SchemaFor200ResponseBodyApplicationJson = Order - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Place an order for a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_order.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PlaceOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._place_order_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._place_order_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi deleted file mode 100644 index 14f03216c35..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order/post.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.order import Order - -# body param -SchemaForRequestBodyApplicationJson = Order - - -request_body_order = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = Order -SchemaFor200ResponseBodyApplicationJson = Order - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _place_order_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Place an order for a pet - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_order.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class PlaceOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def place_order( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._place_order_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._place_order_oapg( - body=body, - content_type=content_type, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/__init__.py deleted file mode 100644 index 435dc451244..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.store_order_order_id import Api - -from petstore_api.paths import PathValues - -path = PathValues.STORE_ORDER_ORDER_ID \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py deleted file mode 100644 index 945e984557a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.py +++ /dev/null @@ -1,261 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Path params -OrderIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'order_id': typing.Union[OrderIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '400': _response_for_400, - '404': _response_for_404, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_order_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_order_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete_order( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_order_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_order_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi deleted file mode 100644 index 12d3d0a1e28..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/delete.pyi +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Path params -OrderIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'order_id': typing.Union[OrderIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _delete_order_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_order_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_order_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteOrder(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete_order( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_order( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_order_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_order_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py deleted file mode 100644 index 72396c7aac1..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.order import Order - -from . import path - -# Path params - - -class OrderIdSchema( - schemas.Int64Schema -): - - - class MetaOapg: - format = 'int64' - inclusive_maximum = 5 - inclusive_minimum = 1 -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'order_id': typing.Union[OrderIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = Order -SchemaFor200ResponseBodyApplicationJson = Order - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '404': _response_for_404, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_order_by_id_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Find purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_order_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetOrderById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_order_by_id( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_order_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_order_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi deleted file mode 100644 index 9a9a783a7bd..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/store_order_order_id/get.pyi +++ /dev/null @@ -1,322 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.order import Order - -# Path params - - -class OrderIdSchema( - schemas.Int64Schema -): - pass -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'order_id': typing.Union[OrderIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_order_id = api_client.PathParameter( - name="order_id", - style=api_client.ParameterStyle.SIMPLE, - schema=OrderIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = Order -SchemaFor200ResponseBodyApplicationJson = Order - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_order_by_id_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_order_by_id_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Find purchase order by ID - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_order_id, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetOrderById(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_order_by_id( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_order_by_id( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_order_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_order_by_id_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/__init__.py deleted file mode 100644 index 9cb59c35fb2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py deleted file mode 100644 index 185849c735f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.py +++ /dev/null @@ -1,307 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi deleted file mode 100644 index d0bae910206..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user/post.pyi +++ /dev/null @@ -1,302 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Create user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_user_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/__init__.py deleted file mode 100644 index 984db1ea2bb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user_create_with_array import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER_CREATE_WITH_ARRAY \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py deleted file mode 100644 index ac14f66afff..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.py +++ /dev/null @@ -1,332 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUsersWithArrayInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_array_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_array_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi deleted file mode 100644 index 0b6b0a59f76..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_array/post.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_users_with_array_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUsersWithArrayInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_users_with_array_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_array_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_array_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/__init__.py deleted file mode 100644 index 3930d4bbca5..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user_create_with_list import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER_CREATE_WITH_LIST \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py deleted file mode 100644 index 948b69eb707..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.py +++ /dev/null @@ -1,332 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUsersWithListInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_list_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_list_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi deleted file mode 100644 index 56449661bdb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_create_with_list/post.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['User']: - return User - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['User'], typing.List['User']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'User': - return super().__getitem__(i) - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_users_with_list_input_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Creates list of users with given input array - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateUsersWithListInput(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_users_with_list_input( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_list_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_users_with_list_input_oapg( - body=body, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/__init__.py deleted file mode 100644 index 7dbf363c109..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user_login import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER_LOGIN \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py deleted file mode 100644 index 6f7e561cefb..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.py +++ /dev/null @@ -1,343 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Query params -UsernameSchema = schemas.StrSchema -PasswordSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'username': typing.Union[UsernameSchema, str, ], - 'password': typing.Union[PasswordSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_username = api_client.QueryParameter( - name="username", - style=api_client.ParameterStyle.FORM, - schema=UsernameSchema, - required=True, - explode=True, -) -request_query_password = api_client.QueryParameter( - name="password", - style=api_client.ParameterStyle.FORM, - schema=PasswordSchema, - required=True, - explode=True, -) -XRateLimitSchema = schemas.Int32Schema -x_rate_limit_parameter = api_client.HeaderParameter( - name="X-Rate-Limit", - style=api_client.ParameterStyle.SIMPLE, - schema=XRateLimitSchema, -) -XExpiresAfterSchema = schemas.DateTimeSchema -x_expires_after_parameter = api_client.HeaderParameter( - name="X-Expires-After", - style=api_client.ParameterStyle.SIMPLE, - schema=XExpiresAfterSchema, -) -SchemaFor200ResponseBodyApplicationXml = schemas.StrSchema -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'X-Rate-Limit': XRateLimitSchema, - 'X-Expires-After': XExpiresAfterSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - x_rate_limit_parameter, - x_expires_after_parameter, - ] -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _login_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Logs user into the system - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_username, - request_query_password, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LoginUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def login_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi deleted file mode 100644 index a3fcbd6103d..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_login/get.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Query params -UsernameSchema = schemas.StrSchema -PasswordSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'username': typing.Union[UsernameSchema, str, ], - 'password': typing.Union[PasswordSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_username = api_client.QueryParameter( - name="username", - style=api_client.ParameterStyle.FORM, - schema=UsernameSchema, - required=True, - explode=True, -) -request_query_password = api_client.QueryParameter( - name="password", - style=api_client.ParameterStyle.FORM, - schema=PasswordSchema, - required=True, - explode=True, -) -XRateLimitSchema = schemas.Int32Schema -XExpiresAfterSchema = schemas.DateTimeSchema -SchemaFor200ResponseBodyApplicationXml = schemas.StrSchema -SchemaFor200ResponseBodyApplicationJson = schemas.StrSchema -ResponseHeadersFor200 = typing_extensions.TypedDict( - 'ResponseHeadersFor200', - { - 'X-Rate-Limit': XRateLimitSchema, - 'X-Expires-After': XExpiresAfterSchema, - } -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: ResponseHeadersFor200 - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, - headers=[ - x_rate_limit_parameter, - x_expires_after_parameter, - ] -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _login_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _login_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Logs user into the system - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_username, - request_query_password, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LoginUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def login_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def login_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._login_user_oapg( - query_params=query_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/__init__.py deleted file mode 100644 index 625c23c6d0e..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user_logout import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER_LOGOUT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py deleted file mode 100644 index b323541d77f..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.py +++ /dev/null @@ -1,210 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) -_status_code_to_response = { - 'default': _response_for_default, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _logout_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Logs out current logged in user session - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogoutUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def logout_user( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._logout_user_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._logout_user_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi deleted file mode 100644 index caf593877aa..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_logout/get.pyi +++ /dev/null @@ -1,205 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - - - -@dataclass -class ApiResponseForDefault(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_default = api_client.OpenApiResponse( - response_cls=ApiResponseForDefault, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def _logout_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _logout_user_oapg( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Logs out current logged in user session - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - used_path = path.value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - default_response = _status_code_to_response.get('default') - if default_response: - api_response = default_response.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class LogoutUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def logout_user( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def logout_user( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._logout_user_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseForDefault, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseForDefault, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._logout_user_oapg( - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/__init__.py deleted file mode 100644 index c78d37255f6..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -# do not import all endpoints into this module because that uses a lot of memory and stack frames -# if you need the ability to import all endpoints from this module, import them with -# from petstore_api.paths.user_username import Api - -from petstore_api.paths import PathValues - -path = PathValues.USER_USERNAME \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py deleted file mode 100644 index 8b3f7928cc2..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.py +++ /dev/null @@ -1,273 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from . import path - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '200': _response_for_200, - '404': _response_for_404, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi deleted file mode 100644 index 757358c2c3a..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/delete.pyi +++ /dev/null @@ -1,267 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_user_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Delete user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class DeleteUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_user( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_user( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiFordelete(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_user_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py deleted file mode 100644 index 866197ce326..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.py +++ /dev/null @@ -1,324 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = User -SchemaFor200ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '200': _response_for_200, - '400': _response_for_400, - '404': _response_for_404, -} -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_user_by_name_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get user by user name - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUserByName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_user_by_name( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_by_name_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_by_name_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi deleted file mode 100644 index 237f8380594..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/get.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationXml = User -SchemaFor200ResponseBodyApplicationJson = User - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationXml, - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/xml': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationXml), - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_all_accept_content_types = ( - 'application/xml', - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_user_by_name_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_user_by_name_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Get user by user name - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetUserByName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_user_by_name( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_user_by_name( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_by_name_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_user_by_name_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py deleted file mode 100644 index ceecd6565fe..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.py +++ /dev/null @@ -1,352 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -from . import path - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) -_status_code_to_response = { - '400': _response_for_400, - '404': _response_for_404, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Updated user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi b/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi deleted file mode 100644 index b4bc40a4a14..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/paths/user_username/put.pyi +++ /dev/null @@ -1,346 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from petstore_api import schemas # noqa: F401 - -from petstore_api.model.user import User - -# Path params -UsernameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'username': typing.Union[UsernameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_username = api_client.PathParameter( - name="username", - style=api_client.ParameterStyle.SIMPLE, - schema=UsernameSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = User - - -request_body_user = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor400(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_400 = api_client.OpenApiResponse( - response_cls=ApiResponseFor400, -) - - -@dataclass -class ApiResponseFor404(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_404 = api_client.OpenApiResponse( - response_cls=ApiResponseFor404, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - Updated user - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_username, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_user.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - headers=_headers, - fields=_fields, - body=_body, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class UpdateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForput(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._update_user_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - diff --git a/samples/openapi3/client/petstore/python/petstore_api/rest.py b/samples/openapi3/client/petstore/python/petstore_api/rest.py deleted file mode 100644 index 6b0d2829e30..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/rest.py +++ /dev/null @@ -1,257 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import logging -import ssl -from urllib.parse import urlencode -import typing - -import certifi -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api.exceptions import ApiException, ApiValueError - - -logger = logging.getLogger(__name__) - - -class RESTClientObject(object): - - def __init__(self, configuration, pools_size=4, maxsize=None): - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # ca_certs - if configuration.ssl_ca_cert: - ca_certs = configuration.ssl_ca_cert - else: - # if not set certificate file, use Mozilla's root certificates. - ca_certs = certifi.where() - - addition_pool_args = {} - if configuration.assert_hostname is not None: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - self.pool_manager = urllib3.ProxyManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - proxy_url=configuration.proxy, - proxy_headers=configuration.proxy_headers, - **addition_pool_args - ) - else: - self.pool_manager = urllib3.PoolManager( - num_pools=pools_size, - maxsize=maxsize, - cert_reqs=cert_reqs, - ca_certs=ca_certs, - cert_file=configuration.cert_file, - key_file=configuration.key_file, - **addition_pool_args - ) - - def request( - self, - method: str, - url: str, - headers: typing.Optional[HTTPHeaderDict] = None, - fields: typing.Optional[typing.Tuple[typing.Tuple[str, typing.Any], ...]] = None, - body: typing.Optional[typing.Union[str, bytes]] = None, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> urllib3.HTTPResponse: - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request body, for other types - :param fields: request parameters for - `application/x-www-form-urlencoded` - or `multipart/form-data` - :param stream: if True, the urllib3.HTTPResponse object will - be returned without reading/decoding response - data. Default is False. - :param timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', - 'PATCH', 'OPTIONS'] - - if fields and body: - raise ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - fields = fields or {} - headers = headers or {} - - if timeout: - if isinstance(timeout, (int, float)): # noqa: E501,F821 - timeout = urllib3.Timeout(total=timeout) - elif (isinstance(timeout, tuple) and - len(timeout) == 2): - timeout = urllib3.Timeout(connect=timeout[0], read=timeout[1]) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - fields=fields, - encode_multipart=False, - preload_content=not stream, - timeout=timeout, - headers=headers) - elif headers['Content-Type'] == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=timeout, - headers=headers) - # Pass a `string` parameter directly in the body to support - # other content types than Json when `body` argument is - # provided in serialized form - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - if not stream: - # log response body - logger.debug("response body: %s", r.data) - - return r - - def GET(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("GET", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def HEAD(self, url, headers=None, stream=False, - timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("HEAD", url, - headers=headers, - stream=stream, - timeout=timeout, - fields=fields) - - def OPTIONS(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("OPTIONS", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def DELETE(self, url, headers=None, body=None, - stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("DELETE", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def POST(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("POST", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PUT(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PUT", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) - - def PATCH(self, url, headers=None, - body=None, stream=False, timeout=None, fields=None) -> urllib3.HTTPResponse: - return self.request("PATCH", url, - headers=headers, - stream=stream, - timeout=timeout, - body=body, fields=fields) diff --git a/samples/openapi3/client/petstore/python/petstore_api/schemas.py b/samples/openapi3/client/petstore/python/petstore_api/schemas.py deleted file mode 100644 index b96bc1f1fda..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/schemas.py +++ /dev/null @@ -1,2475 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from collections import defaultdict -from datetime import date, datetime, timedelta # noqa: F401 -import functools -import decimal -import io -import re -import types -import typing -import uuid - -from dateutil.parser.isoparser import isoparser, _takes_ascii -import frozendict - -from petstore_api.exceptions import ( - ApiTypeError, - ApiValueError, -) -from petstore_api.configuration import ( - Configuration, -) - - -class Unset(object): - """ - An instance of this class is set as the default value for object type(dict) properties that are optional - When a property has an unset value, that property will not be assigned in the dict - """ - pass - -unset = Unset() - -none_type = type(None) -file_type = io.IOBase - - -class FileIO(io.FileIO): - """ - A class for storing files - Note: this class is not immutable - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader]): - if isinstance(_arg, (io.FileIO, io.BufferedReader)): - if _arg.closed: - raise ApiValueError('Invalid file state; file is closed and must be open') - _arg.close() - inst = super(FileIO, cls).__new__(cls, _arg.name) - super(FileIO, inst).__init__(_arg.name) - return inst - raise ApiValueError('FileIO must be passed _arg which contains the open file') - - def __init__(self, _arg: typing.Union[io.FileIO, io.BufferedReader]): - pass - - -def update(d: dict, u: dict): - """ - Adds u to d - Where each dict is defaultdict(set) - """ - if not u: - return d - for k, v in u.items(): - if k not in d: - d[k] = v - else: - d[k] = d[k] | v - - -class ValidationMetadata(frozendict.frozendict): - """ - A class storing metadata that is needed to validate OpenApi Schema payloads - """ - def __new__( - cls, - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), - from_server: bool = False, - configuration: typing.Optional[Configuration] = None, - seen_classes: typing.FrozenSet[typing.Type] = frozenset(), - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]] = frozendict.frozendict() - ): - """ - Args: - path_to_item: the path to the current data being instantiated. - For {'a': [1]} if the code is handling, 1, then the path is ('args[0]', 'a', 0) - This changes from location to location - from_server: whether or not this data came form the server - True when receiving server data - False when instantiating model with client side data not form the server - This does not change from location to location - configuration: the Configuration instance to use - This is needed because in Configuration: - - one can disable validation checking - This does not change from location to location - seen_classes: when deserializing data that matches multiple schemas, this is used to store - the schemas that have been traversed. This is used to stop processing when a cycle is seen. - This changes from location to location - validated_path_to_schemas: stores the already validated schema classes for a given path location - This does not change from location to location - """ - return super().__new__( - cls, - path_to_item=path_to_item, - from_server=from_server, - configuration=configuration, - seen_classes=seen_classes, - validated_path_to_schemas=validated_path_to_schemas - ) - - def validation_ran_earlier(self, cls: type) -> bool: - validated_schemas = self.validated_path_to_schemas.get(self.path_to_item, set()) - validation_ran_earlier = validated_schemas and cls in validated_schemas - if validation_ran_earlier: - return True - if cls in self.seen_classes: - return True - return False - - @property - def path_to_item(self) -> typing.Tuple[typing.Union[str, int], ...]: - return self.get('path_to_item') - - @property - def from_server(self) -> bool: - return self.get('from_server') - - @property - def configuration(self) -> typing.Optional[Configuration]: - return self.get('configuration') - - @property - def seen_classes(self) -> typing.FrozenSet[typing.Type]: - return self.get('seen_classes') - - @property - def validated_path_to_schemas(self) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Type]]: - return self.get('validated_path_to_schemas') - - -def add_deeper_validated_schemas(validation_metadata: ValidationMetadata, path_to_schemas: dict): - # this is called if validation_ran_earlier and current and deeper locations need to be added - current_path_to_item = validation_metadata.path_to_item - other_path_to_schemas = {} - for path_to_item, schemas in validation_metadata.validated_path_to_schemas.items(): - if len(path_to_item) < len(current_path_to_item): - continue - path_begins_with_current_path = path_to_item[:len(current_path_to_item)] == current_path_to_item - if path_begins_with_current_path: - other_path_to_schemas[path_to_item] = schemas - update(path_to_schemas, other_path_to_schemas) - - -class Singleton: - """ - Enums and singletons are the same - The same instance is returned for a given key of (cls, _arg) - """ - _instances = {} - - def __new__(cls, _arg: typing.Any, **kwargs): - """ - cls base classes: BoolClass, NoneClass, str, decimal.Decimal - The 3rd key is used in the tuple below for a corner case where an enum contains integer 1 - However 1.0 can also be ingested into that enum schema because 1.0 == 1 and - Decimal('1.0') == Decimal('1') - But if we omitted the 3rd value in the key, then Decimal('1.0') would be stored as Decimal('1') - and json serializing that instance would be '1' rather than the expected '1.0' - Adding the 3rd value, the str of _arg ensures that 1.0 -> Decimal('1.0') which is serialized as 1.0 - """ - key = (cls, _arg, str(_arg)) - if key not in cls._instances: - if isinstance(_arg, (none_type, bool, BoolClass, NoneClass)): - inst = super().__new__(cls) - cls._instances[key] = inst - else: - cls._instances[key] = super().__new__(cls, _arg) - return cls._instances[key] - - def __repr__(self): - if isinstance(self, NoneClass): - return f'<{self.__class__.__name__}: None>' - elif isinstance(self, BoolClass): - if bool(self): - return f'<{self.__class__.__name__}: True>' - return f'<{self.__class__.__name__}: False>' - return f'<{self.__class__.__name__}: {super().__repr__()}>' - - -class classproperty: - - def __init__(self, fget): - self.fget = fget - - def __get__(self, owner_self, owner_cls): - return self.fget(owner_cls) - - -class NoneClass(Singleton): - @classproperty - def NONE(cls): - return cls(None) - - def __bool__(self) -> bool: - return False - - -class BoolClass(Singleton): - @classproperty - def TRUE(cls): - return cls(True) - - @classproperty - def FALSE(cls): - return cls(False) - - @functools.lru_cache() - def __bool__(self) -> bool: - for key, instance in self._instances.items(): - if self is instance: - return bool(key[1]) - raise ValueError('Unable to find the boolean value of this instance') - - -class MetaOapgTyped: - exclusive_maximum: typing.Union[int, float] - inclusive_maximum: typing.Union[int, float] - exclusive_minimum: typing.Union[int, float] - inclusive_minimum: typing.Union[int, float] - max_items: int - min_items: int - discriminator: typing.Dict[str, typing.Dict[str, typing.Type['Schema']]] - - - class properties: - # to hold object properties - pass - - additional_properties: typing.Optional[typing.Type['Schema']] - max_properties: int - min_properties: int - all_of: typing.List[typing.Type['Schema']] - one_of: typing.List[typing.Type['Schema']] - any_of: typing.List[typing.Type['Schema']] - not_schema: typing.Type['Schema'] - max_length: int - min_length: int - items: typing.Type['Schema'] - - -class Schema: - """ - the base class of all swagger/openapi schemas/models - """ - __inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict.frozendict, FileIO, bytes, BoolClass, NoneClass} - _types: typing.Set[typing.Type] - MetaOapg = MetaOapgTyped - - @staticmethod - def __get_valid_classes_phrase(input_classes): - """Returns a string phrase describing what types are allowed""" - all_classes = list(input_classes) - all_classes = sorted(all_classes, key=lambda cls: cls.__name__) - all_class_names = [cls.__name__ for cls in all_classes] - if len(all_class_names) == 1: - return "is {0}".format(all_class_names[0]) - return "is one of [{0}]".format(", ".join(all_class_names)) - - @staticmethod - def _get_class_oapg(item_cls: typing.Union[types.FunctionType, staticmethod, typing.Type['Schema']]) -> typing.Type['Schema']: - if isinstance(item_cls, types.FunctionType): - # referenced schema - return item_cls() - elif isinstance(item_cls, staticmethod): - # referenced schema - return item_cls.__func__() - return item_cls - - @classmethod - def __type_error_message( - cls, var_value=None, var_name=None, valid_classes=None, key_type=None - ): - """ - Keyword Args: - var_value (any): the variable which has the type_error - var_name (str): the name of the variable which has the typ error - valid_classes (tuple): the accepted classes for current_item's - value - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a tuple - """ - key_or_value = "value" - if key_type: - key_or_value = "key" - valid_classes_phrase = cls.__get_valid_classes_phrase(valid_classes) - msg = "Invalid type. Required {1} type {2} and " "passed type was {3}".format( - var_name, - key_or_value, - valid_classes_phrase, - type(var_value).__name__, - ) - return msg - - @classmethod - def __get_type_error(cls, var_value, path_to_item, valid_classes, key_type=False): - error_msg = cls.__type_error_message( - var_name=path_to_item[-1], - var_value=var_value, - valid_classes=valid_classes, - key_type=key_type, - ) - return ApiTypeError( - error_msg, - path_to_item=path_to_item, - valid_classes=valid_classes, - key_type=key_type, - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - Schema _validate_oapg - All keyword validation except for type checking was done in calling stack frames - If those validations passed, the validated classes are collected in path_to_schemas - - Returns: - path_to_schemas: a map of path to schemas - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - base_class = type(arg) - if base_class not in cls._types: - raise cls.__get_type_error( - arg, - validation_metadata.path_to_item, - cls._types, - key_type=False, - ) - - path_to_schemas = {validation_metadata.path_to_item: set()} - path_to_schemas[validation_metadata.path_to_item].add(cls) - path_to_schemas[validation_metadata.path_to_item].add(base_class) - return path_to_schemas - - @staticmethod - def _process_schema_classes_oapg( - schema_classes: typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]] - ): - """ - Processes and mutates schema_classes - If a SomeSchema is a subclass of DictSchema then remove DictSchema because it is already included - """ - if len(schema_classes) < 2: - return - if len(schema_classes) > 2 and UnsetAnyTypeSchema in schema_classes: - schema_classes.remove(UnsetAnyTypeSchema) - x_schema = schema_type_classes & schema_classes - if not x_schema: - return - x_schema = x_schema.pop() - if any(c is not x_schema and issubclass(c, x_schema) for c in schema_classes): - # needed to not have a mro error in get_new_class - schema_classes.remove(x_schema) - - @classmethod - def __get_new_cls( - cls, - arg, - validation_metadata: ValidationMetadata - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']]: - """ - Make a new dynamic class and return an instance of that class - We are making an instance of cls, but instead of making cls - make a new class, new_cls - which includes dynamic bases including cls - return an instance of that new class - - Dict property + List Item Assignment Use cases: - 1. value is NOT an instance of the required schema class - the value is validated by _validate_oapg - _validate_oapg returns a key value pair - where the key is the path to the item, and the value will be the required manufactured class - made out of the matching schemas - 2. value is an instance of the correct schema type - the value is NOT validated by _validate_oapg, _validate_oapg only checks that the instance is of the correct schema type - for this value, _validate_oapg does NOT return an entry for it in _path_to_schemas - and in list/dict _get_items_oapg,_get_properties_oapg the value will be directly assigned - because value is of the correct type, and validation was run earlier when the instance was created - """ - _path_to_schemas = {} - if validation_metadata.validation_ran_earlier(cls): - add_deeper_validated_schemas(validation_metadata, _path_to_schemas) - else: - other_path_to_schemas = cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - # loop through it make a new class for each entry - # do not modify the returned result because it is cached and we would be modifying the cached value - path_to_schemas = {} - for path, schema_classes in _path_to_schemas.items(): - """ - Use cases - 1. N number of schema classes + enum + type != bool/None, classes in path_to_schemas: tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - needs Singleton added - 2. N number of schema classes + enum + type == bool/None, classes in path_to_schemas: BoolClass/NoneClass - Singleton already added - 3. N number of schema classes, classes in path_to_schemas: BoolClass/NoneClass/tuple/frozendict.frozendict/str/Decimal/bytes/FileIo - """ - cls._process_schema_classes_oapg(schema_classes) - enum_schema = any( - issubclass(this_cls, EnumBase) for this_cls in schema_classes) - inheritable_primitive_type = schema_classes.intersection(cls.__inheritable_primitive_types_set) - chosen_schema_classes = schema_classes - inheritable_primitive_type - suffix = tuple(inheritable_primitive_type) - if enum_schema and suffix[0] not in {NoneClass, BoolClass}: - suffix = (Singleton,) + suffix - - used_classes = tuple(sorted(chosen_schema_classes, key=lambda a_cls: a_cls.__name__)) + suffix - mfg_cls = get_new_class(class_name='DynamicSchema', bases=used_classes) - path_to_schemas[path] = mfg_cls - - return path_to_schemas - - @classmethod - def _get_new_instance_without_conversion_oapg( - cls, - arg: typing.Any, - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - # We have a Dynamic class and we are making an instance of it - if issubclass(cls, frozendict.frozendict) and issubclass(cls, DictBase): - properties = cls._get_properties_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, properties) - elif issubclass(cls, tuple) and issubclass(cls, ListBase): - items = cls._get_items_oapg(arg, path_to_item, path_to_schemas) - return super(Schema, cls).__new__(cls, items) - """ - str = openapi str, date, and datetime - decimal.Decimal = openapi int and float - FileIO = openapi binary type and the user inputs a file - bytes = openapi binary type and the user inputs bytes - """ - return super(Schema, cls).__new__(cls, arg) - - @classmethod - def from_openapi_data_oapg( - cls, - arg: typing.Union[ - str, - date, - datetime, - int, - float, - decimal.Decimal, - bool, - None, - 'Schema', - dict, - frozendict.frozendict, - tuple, - list, - io.FileIO, - io.BufferedReader, - bytes - ], - _configuration: typing.Optional[Configuration] - ): - """ - Schema from_openapi_data_oapg - """ - from_server = True - validated_path_to_schemas = {} - arg = cast_to_allowed_types(arg, from_server, validated_path_to_schemas) - validation_metadata = ValidationMetadata( - from_server=from_server, configuration=_configuration, validated_path_to_schemas=validated_path_to_schemas) - path_to_schemas = cls.__get_new_cls(arg, validation_metadata) - new_cls = path_to_schemas[validation_metadata.path_to_item] - new_inst = new_cls._get_new_instance_without_conversion_oapg( - arg, - validation_metadata.path_to_item, - path_to_schemas - ) - return new_inst - - @staticmethod - def __get_input_dict(*args, **kwargs) -> frozendict.frozendict: - input_dict = {} - if args and isinstance(args[0], (dict, frozendict.frozendict)): - input_dict.update(args[0]) - if kwargs: - input_dict.update(kwargs) - return frozendict.frozendict(input_dict) - - @staticmethod - def __remove_unsets(kwargs): - return {key: val for key, val in kwargs.items() if val is not unset} - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _configuration: typing.Optional[Configuration] = None, **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]): - """ - Schema __new__ - - Args: - _args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): the value - kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict.frozendict/bool/None): dict values - _configuration: contains the Configuration that enables json schema validation keywords - like minItems, minLength etc - - Note: double underscores are used here because pycharm thinks that these variables - are instance properties if they are named normally :( - """ - __kwargs = cls.__remove_unsets(kwargs) - if not _args and not __kwargs: - raise TypeError( - 'No input given. args or kwargs must be given.' - ) - if not __kwargs and _args and not isinstance(_args[0], dict): - __arg = _args[0] - else: - __arg = cls.__get_input_dict(*_args, **__kwargs) - __from_server = False - __validated_path_to_schemas = {} - __arg = cast_to_allowed_types( - __arg, __from_server, __validated_path_to_schemas) - __validation_metadata = ValidationMetadata( - configuration=_configuration, from_server=__from_server, validated_path_to_schemas=__validated_path_to_schemas) - __path_to_schemas = cls.__get_new_cls(__arg, __validation_metadata) - __new_cls = __path_to_schemas[__validation_metadata.path_to_item] - return __new_cls._get_new_instance_without_conversion_oapg( - __arg, - __validation_metadata.path_to_item, - __path_to_schemas - ) - - def __init__( - self, - *_args: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], - _configuration: typing.Optional[Configuration] = None, - **kwargs: typing.Union[ - dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset - ] - ): - """ - this is needed to fix 'Unexpected argument' warning in pycharm - this code does nothing because all Schema instances are immutable - this means that all input data is passed into and used in new, and after the new instance is made - no new attributes are assigned and init is not used - """ - pass - -""" -import itertools -data_types = ('None', 'FrozenDict', 'Tuple', 'Str', 'Decimal', 'Bool') -type_to_cls = { - 'None': 'NoneClass', - 'FrozenDict': 'frozendict.frozendict', - 'Tuple': 'tuple', - 'Str': 'str', - 'Decimal': 'decimal.Decimal', - 'Bool': 'BoolClass' -} -cls_tuples = [v for v in itertools.combinations(data_types, 5)] -typed_classes = [f"class {''.join(cls_tuple)}Mixin({', '.join(type_to_cls[typ] for typ in cls_tuple)}):\n pass" for cls_tuple in cls_tuples] -for cls in typed_classes: - print(cls) -object_classes = [f"{''.join(cls_tuple)}Mixin = object" for cls_tuple in cls_tuples] -for cls in object_classes: - print(cls) -""" -if typing.TYPE_CHECKING: - # qty 1 - NoneMixin = NoneClass - FrozenDictMixin = frozendict.frozendict - TupleMixin = tuple - StrMixin = str - DecimalMixin = decimal.Decimal - BoolMixin = BoolClass - BytesMixin = bytes - FileMixin = FileIO - # qty 2 - class BinaryMixin(bytes, FileIO): - pass - class NoneFrozenDictMixin(NoneClass, frozendict.frozendict): - pass - class NoneTupleMixin(NoneClass, tuple): - pass - class NoneStrMixin(NoneClass, str): - pass - class NoneDecimalMixin(NoneClass, decimal.Decimal): - pass - class NoneBoolMixin(NoneClass, BoolClass): - pass - class FrozenDictTupleMixin(frozendict.frozendict, tuple): - pass - class FrozenDictStrMixin(frozendict.frozendict, str): - pass - class FrozenDictDecimalMixin(frozendict.frozendict, decimal.Decimal): - pass - class FrozenDictBoolMixin(frozendict.frozendict, BoolClass): - pass - class TupleStrMixin(tuple, str): - pass - class TupleDecimalMixin(tuple, decimal.Decimal): - pass - class TupleBoolMixin(tuple, BoolClass): - pass - class StrDecimalMixin(str, decimal.Decimal): - pass - class StrBoolMixin(str, BoolClass): - pass - class DecimalBoolMixin(decimal.Decimal, BoolClass): - pass - # qty 3 - class NoneFrozenDictTupleMixin(NoneClass, frozendict.frozendict, tuple): - pass - class NoneFrozenDictStrMixin(NoneClass, frozendict.frozendict, str): - pass - class NoneFrozenDictDecimalMixin(NoneClass, frozendict.frozendict, decimal.Decimal): - pass - class NoneFrozenDictBoolMixin(NoneClass, frozendict.frozendict, BoolClass): - pass - class NoneTupleStrMixin(NoneClass, tuple, str): - pass - class NoneTupleDecimalMixin(NoneClass, tuple, decimal.Decimal): - pass - class NoneTupleBoolMixin(NoneClass, tuple, BoolClass): - pass - class NoneStrDecimalMixin(NoneClass, str, decimal.Decimal): - pass - class NoneStrBoolMixin(NoneClass, str, BoolClass): - pass - class NoneDecimalBoolMixin(NoneClass, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrMixin(frozendict.frozendict, tuple, str): - pass - class FrozenDictTupleDecimalMixin(frozendict.frozendict, tuple, decimal.Decimal): - pass - class FrozenDictTupleBoolMixin(frozendict.frozendict, tuple, BoolClass): - pass - class FrozenDictStrDecimalMixin(frozendict.frozendict, str, decimal.Decimal): - pass - class FrozenDictStrBoolMixin(frozendict.frozendict, str, BoolClass): - pass - class FrozenDictDecimalBoolMixin(frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalMixin(tuple, str, decimal.Decimal): - pass - class TupleStrBoolMixin(tuple, str, BoolClass): - pass - class TupleDecimalBoolMixin(tuple, decimal.Decimal, BoolClass): - pass - class StrDecimalBoolMixin(str, decimal.Decimal, BoolClass): - pass - # qty 4 - class NoneFrozenDictTupleStrMixin(NoneClass, frozendict.frozendict, tuple, str): - pass - class NoneFrozenDictTupleDecimalMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal): - pass - class NoneFrozenDictTupleBoolMixin(NoneClass, frozendict.frozendict, tuple, BoolClass): - pass - class NoneFrozenDictStrDecimalMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal): - pass - class NoneFrozenDictStrBoolMixin(NoneClass, frozendict.frozendict, str, BoolClass): - pass - class NoneFrozenDictDecimalBoolMixin(NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalMixin(NoneClass, tuple, str, decimal.Decimal): - pass - class NoneTupleStrBoolMixin(NoneClass, tuple, str, BoolClass): - pass - class NoneTupleDecimalBoolMixin(NoneClass, tuple, decimal.Decimal, BoolClass): - pass - class NoneStrDecimalBoolMixin(NoneClass, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalMixin(frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class FrozenDictTupleStrBoolMixin(frozendict.frozendict, tuple, str, BoolClass): - pass - class FrozenDictTupleDecimalBoolMixin(frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class FrozenDictStrDecimalBoolMixin(frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class TupleStrDecimalBoolMixin(tuple, str, decimal.Decimal, BoolClass): - pass - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal): - pass - class NoneFrozenDictTupleStrBoolMixin(NoneClass, frozendict.frozendict, tuple, str, BoolClass): - pass - class NoneFrozenDictTupleDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass): - pass - class NoneFrozenDictStrDecimalBoolMixin(NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass): - pass - class NoneTupleStrDecimalBoolMixin(NoneClass, tuple, str, decimal.Decimal, BoolClass): - pass - class FrozenDictTupleStrDecimalBoolMixin(frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass): - pass - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin(NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes): - pass -else: - # qty 1 - class NoneMixin: - _types = {NoneClass} - class FrozenDictMixin: - _types = {frozendict.frozendict} - class TupleMixin: - _types = {tuple} - class StrMixin: - _types = {str} - class DecimalMixin: - _types = {decimal.Decimal} - class BoolMixin: - _types = {BoolClass} - class BytesMixin: - _types = {bytes} - class FileMixin: - _types = {FileIO} - # qty 2 - class BinaryMixin: - _types = {bytes, FileIO} - class NoneFrozenDictMixin: - _types = {NoneClass, frozendict.frozendict} - class NoneTupleMixin: - _types = {NoneClass, tuple} - class NoneStrMixin: - _types = {NoneClass, str} - class NoneDecimalMixin: - _types = {NoneClass, decimal.Decimal} - class NoneBoolMixin: - _types = {NoneClass, BoolClass} - class FrozenDictTupleMixin: - _types = {frozendict.frozendict, tuple} - class FrozenDictStrMixin: - _types = {frozendict.frozendict, str} - class FrozenDictDecimalMixin: - _types = {frozendict.frozendict, decimal.Decimal} - class FrozenDictBoolMixin: - _types = {frozendict.frozendict, BoolClass} - class TupleStrMixin: - _types = {tuple, str} - class TupleDecimalMixin: - _types = {tuple, decimal.Decimal} - class TupleBoolMixin: - _types = {tuple, BoolClass} - class StrDecimalMixin: - _types = {str, decimal.Decimal} - class StrBoolMixin: - _types = {str, BoolClass} - class DecimalBoolMixin: - _types = {decimal.Decimal, BoolClass} - # qty 3 - class NoneFrozenDictTupleMixin: - _types = {NoneClass, frozendict.frozendict, tuple} - class NoneFrozenDictStrMixin: - _types = {NoneClass, frozendict.frozendict, str} - class NoneFrozenDictDecimalMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal} - class NoneFrozenDictBoolMixin: - _types = {NoneClass, frozendict.frozendict, BoolClass} - class NoneTupleStrMixin: - _types = {NoneClass, tuple, str} - class NoneTupleDecimalMixin: - _types = {NoneClass, tuple, decimal.Decimal} - class NoneTupleBoolMixin: - _types = {NoneClass, tuple, BoolClass} - class NoneStrDecimalMixin: - _types = {NoneClass, str, decimal.Decimal} - class NoneStrBoolMixin: - _types = {NoneClass, str, BoolClass} - class NoneDecimalBoolMixin: - _types = {NoneClass, decimal.Decimal, BoolClass} - class FrozenDictTupleStrMixin: - _types = {frozendict.frozendict, tuple, str} - class FrozenDictTupleDecimalMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal} - class FrozenDictTupleBoolMixin: - _types = {frozendict.frozendict, tuple, BoolClass} - class FrozenDictStrDecimalMixin: - _types = {frozendict.frozendict, str, decimal.Decimal} - class FrozenDictStrBoolMixin: - _types = {frozendict.frozendict, str, BoolClass} - class FrozenDictDecimalBoolMixin: - _types = {frozendict.frozendict, decimal.Decimal, BoolClass} - class TupleStrDecimalMixin: - _types = {tuple, str, decimal.Decimal} - class TupleStrBoolMixin: - _types = {tuple, str, BoolClass} - class TupleDecimalBoolMixin: - _types = {tuple, decimal.Decimal, BoolClass} - class StrDecimalBoolMixin: - _types = {str, decimal.Decimal, BoolClass} - # qty 4 - class NoneFrozenDictTupleStrMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str} - class NoneFrozenDictTupleDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal} - class NoneFrozenDictTupleBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, BoolClass} - class NoneFrozenDictStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal} - class NoneFrozenDictStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, BoolClass} - class NoneFrozenDictDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalMixin: - _types = {NoneClass, tuple, str, decimal.Decimal} - class NoneTupleStrBoolMixin: - _types = {NoneClass, tuple, str, BoolClass} - class NoneTupleDecimalBoolMixin: - _types = {NoneClass, tuple, decimal.Decimal, BoolClass} - class NoneStrDecimalBoolMixin: - _types = {NoneClass, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal} - class FrozenDictTupleStrBoolMixin: - _types = {frozendict.frozendict, tuple, str, BoolClass} - class FrozenDictTupleDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class FrozenDictStrDecimalBoolMixin: - _types = {frozendict.frozendict, str, decimal.Decimal, BoolClass} - class TupleStrDecimalBoolMixin: - _types = {tuple, str, decimal.Decimal, BoolClass} - # qty 5 - class NoneFrozenDictTupleStrDecimalMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal} - class NoneFrozenDictTupleStrBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, BoolClass} - class NoneFrozenDictTupleDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, decimal.Decimal, BoolClass} - class NoneFrozenDictStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, str, decimal.Decimal, BoolClass} - class NoneTupleStrDecimalBoolMixin: - _types = {NoneClass, tuple, str, decimal.Decimal, BoolClass} - class FrozenDictTupleStrDecimalBoolMixin: - _types = {frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 6 - class NoneFrozenDictTupleStrDecimalBoolMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass} - # qty 8 - class NoneFrozenDictTupleStrDecimalBoolFileBytesMixin: - _types = {NoneClass, frozendict.frozendict, tuple, str, decimal.Decimal, BoolClass, FileIO, bytes} - - -class ValidatorBase: - @staticmethod - def _is_json_validation_enabled_oapg(schema_keyword, configuration=None): - """Returns true if JSON schema validation is enabled for the specified - validation keyword. This can be used to skip JSON schema structural validation - as requested in the configuration. - Note: the suffix _oapg stands for openapi python (experimental) generator and - it has been added to prevent collisions with other methods and properties - - Args: - schema_keyword (string): the name of a JSON schema validation keyword. - configuration (Configuration): the configuration class. - """ - - return (configuration is None or - not hasattr(configuration, '_disabled_client_side_validations') or - schema_keyword not in configuration._disabled_client_side_validations) - - @staticmethod - def _raise_validation_error_message_oapg(value, constraint_msg, constraint_value, path_to_item, additional_txt=""): - raise ApiValueError( - "Invalid value `{value}`, {constraint_msg} `{constraint_value}`{additional_txt} at {path_to_item}".format( - value=value, - constraint_msg=constraint_msg, - constraint_value=constraint_value, - additional_txt=additional_txt, - path_to_item=path_to_item, - ) - ) - - -class EnumBase: - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - EnumBase _validate_oapg - Validates that arg is in the enum's allowed values - """ - try: - cls.MetaOapg.enum_value_to_name[arg] - except KeyError: - raise ApiValueError("Invalid value {} passed in to {}, allowed_values={}".format(arg, cls, cls.MetaOapg.enum_value_to_name.keys())) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class BoolBase: - def is_true_oapg(self) -> bool: - """ - A replacement for x is True - True if the instance is a BoolClass True Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) - - def is_false_oapg(self) -> bool: - """ - A replacement for x is False - True if the instance is a BoolClass False Singleton - """ - if not issubclass(self.__class__, BoolClass): - return False - return bool(self) is False - - -class NoneBase: - def is_none_oapg(self) -> bool: - """ - A replacement for x is None - True if the instance is a NoneClass None Singleton - """ - if issubclass(self.__class__, NoneClass): - return True - return False - - -class StrBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_str_oapg(self) -> str: - return self - - @property - def as_date_oapg(self) -> date: - raise Exception('not implemented') - - @property - def as_datetime_oapg(self) -> datetime: - raise Exception('not implemented') - - @property - def as_decimal_oapg(self) -> decimal.Decimal: - raise Exception('not implemented') - - @property - def as_uuid_oapg(self) -> uuid.UUID: - raise Exception('not implemented') - - @classmethod - def __check_str_validations( - cls, - arg: str, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_length') and - len(arg) > cls.MetaOapg.max_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be less than or equal to", - constraint_value=cls.MetaOapg.max_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minLength', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_length') and - len(arg) < cls.MetaOapg.min_length): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="length must be greater than or equal to", - constraint_value=cls.MetaOapg.min_length, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('pattern', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'regex')): - for regex_dict in cls.MetaOapg.regex: - flags = regex_dict.get('flags', 0) - if not re.search(regex_dict['pattern'], arg, flags=flags): - if flags != 0: - # Don't print the regex flags if the flags are not - # specified in the OAS document. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item, - additional_txt=" with flags=`{}`".format(flags) - ) - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must match regular expression", - constraint_value=regex_dict['pattern'], - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - StrBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, str): - cls.__check_str_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class UUIDBase: - @property - @functools.lru_cache() - def as_uuid_oapg(self) -> uuid.UUID: - return uuid.UUID(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - uuid.UUID(arg) - return True - except ValueError: - raise ApiValueError( - "Invalid value '{}' for type UUID at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - UUIDBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class CustomIsoparser(isoparser): - - @_takes_ascii - def parse_isodatetime(self, dt_str): - components, pos = self._parse_isodate(dt_str) - if len(dt_str) > pos: - if self._sep is None or dt_str[pos:pos + 1] == self._sep: - components += self._parse_isotime(dt_str[pos + 1:]) - else: - raise ValueError('String contains unknown ISO components') - - if len(components) > 3 and components[3] == 24: - components[3] = 0 - return datetime(*components) + timedelta(days=1) - - if len(components) <= 3: - raise ValueError('Value is not a datetime') - - return datetime(*components) - - @_takes_ascii - def parse_isodate(self, datestr): - components, pos = self._parse_isodate(datestr) - - if len(datestr) > pos: - raise ValueError('String contains invalid time components') - - if len(components) > 3: - raise ValueError('String contains invalid time components') - - return date(*components) - - -DEFAULT_ISOPARSER = CustomIsoparser() - - -class DateBase: - @property - @functools.lru_cache() - def as_date_oapg(self) -> date: - return DEFAULT_ISOPARSER.parse_isodate(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodate(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 date format. " - "Invalid value '{}' for type date at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: typing.Optional[ValidationMetadata] = None, - ): - """ - DateBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DateTimeBase: - @property - @functools.lru_cache() - def as_datetime_oapg(self) -> datetime: - return DEFAULT_ISOPARSER.parse_isodatetime(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - DEFAULT_ISOPARSER.parse_isodatetime(arg) - return True - except ValueError: - raise ApiValueError( - "Value does not conform to the required ISO-8601 datetime format. " - "Invalid value '{}' for type datetime at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DateTimeBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class DecimalBase: - """ - A class for storing decimals that are sent over the wire as strings - These schemas must remain based on StrBase rather than NumberBase - because picking base classes must be deterministic - """ - - @property - @functools.lru_cache() - def as_decimal_oapg(self) -> decimal.Decimal: - return decimal.Decimal(self) - - @classmethod - def __validate_format(cls, arg: typing.Optional[str], validation_metadata: ValidationMetadata): - if isinstance(arg, str): - try: - decimal.Decimal(arg) - return True - except decimal.InvalidOperation: - raise ApiValueError( - "Value cannot be converted to a decimal. " - "Invalid value '{}' for type decimal at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DecimalBase _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class NumberBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - """ - Note: for some numbers like 9.0 they could be represented as an - integer but our code chooses to store them as - >>> Decimal('9.0').as_tuple() - DecimalTuple(sign=0, digits=(9, 0), exponent=-1) - so we can tell that the value came from a float and convert it back to a float - during later serialization - """ - if self.as_tuple().exponent < 0: - # this could be represented as an integer but should be represented as a float - # because that's what it was serialized from - raise ApiValueError(f'{self} is not an integer') - self._as_int = int(self) - return self._as_int - - @property - def as_float_oapg(self) -> float: - try: - return self._as_float - except AttributeError: - if self.as_tuple().exponent >= 0: - raise ApiValueError(f'{self} is not a float') - self._as_float = float(self) - return self._as_float - - @classmethod - def __check_numeric_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if cls._is_json_validation_enabled_oapg('multipleOf', - validation_metadata.configuration) and hasattr(cls.MetaOapg, 'multiple_of'): - multiple_of_value = cls.MetaOapg.multiple_of - if (not (float(arg) / multiple_of_value).is_integer()): - # Note 'multipleOf' will be as good as the floating point arithmetic. - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="value must be a multiple of", - constraint_value=multiple_of_value, - path_to_item=validation_metadata.path_to_item - ) - - checking_max_or_min_values = any( - hasattr(cls.MetaOapg, validation_key) for validation_key in { - 'exclusive_maximum', - 'inclusive_maximum', - 'exclusive_minimum', - 'inclusive_minimum', - } - ) - if not checking_max_or_min_values: - return - - if (cls._is_json_validation_enabled_oapg('exclusiveMaximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_maximum') and - arg >= cls.MetaOapg.exclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('maximum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_maximum') and - arg > cls.MetaOapg.inclusive_maximum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value less than or equal to", - constraint_value=cls.MetaOapg.inclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('exclusiveMinimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'exclusive_minimum') and - arg <= cls.MetaOapg.exclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than", - constraint_value=cls.MetaOapg.exclusive_maximum, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minimum', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'inclusive_minimum') and - arg < cls.MetaOapg.inclusive_minimum): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="must be a value greater than or equal to", - constraint_value=cls.MetaOapg.inclusive_minimum, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - NumberBase _validate_oapg - Validates that validations pass - """ - if isinstance(arg, decimal.Decimal): - cls.__check_numeric_validations(arg, validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class ListBase(ValidatorBase): - MetaOapg: MetaOapgTyped - - @classmethod - def __validate_items(cls, list_items, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for items are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - list_items: the input list of items - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - - # if we have definitions for an items schema, use it - # otherwise accept anything - item_cls = getattr(cls.MetaOapg, 'items', UnsetAnyTypeSchema) - item_cls = cls._get_class_oapg(item_cls) - path_to_schemas = {} - for i, value in enumerate(list_items): - item_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=validation_metadata.path_to_item+(i,), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if item_validation_metadata.validation_ran_earlier(item_cls): - add_deeper_validated_schemas(item_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = item_cls._validate_oapg( - value, validation_metadata=item_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_tuple_validations( - cls, arg, - validation_metadata: ValidationMetadata): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_items') and - len(arg) > cls.MetaOapg.max_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be less than or equal to", - constraint_value=cls.MetaOapg.max_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_items') and - len(arg) < cls.MetaOapg.min_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of items must be greater than or equal to", - constraint_value=cls.MetaOapg.min_items, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('uniqueItems', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'unique_items') and cls.MetaOapg.unique_items and arg): - unique_items = set(arg) - if len(arg) > len(unique_items): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="duplicate items were found, and the tuple must not contain duplicates because", - constraint_value='unique_items==True', - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - ListBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, tuple): - cls.__check_tuple_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, tuple): - return _path_to_schemas - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - other_path_to_schemas = cls.__validate_items(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_items_oapg( - cls: 'Schema', - arg: typing.List[typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - ''' - ListBase _get_items_oapg - ''' - cast_items = [] - - for i, value in enumerate(arg): - item_path_to_item = path_to_item + (i,) - item_cls = path_to_schemas[item_path_to_item] - new_value = item_cls._get_new_instance_without_conversion_oapg( - value, - item_path_to_item, - path_to_schemas - ) - cast_items.append(new_value) - - return cast_items - - -class Discriminable: - MetaOapg: MetaOapgTyped - - @classmethod - def _ensure_discriminator_value_present_oapg(cls, disc_property_name: str, validation_metadata: ValidationMetadata, *args): - if not args or args and disc_property_name not in args[0]: - # The input data does not contain the discriminator property - raise ApiValueError( - "Cannot deserialize input data due to missing discriminator. " - "The discriminator property '{}' is missing at path: {}".format(disc_property_name, validation_metadata.path_to_item) - ) - - @classmethod - def get_discriminated_class_oapg(cls, disc_property_name: str, disc_payload_value: str): - """ - Used in schemas with discriminators - """ - if not hasattr(cls.MetaOapg, 'discriminator'): - return None - disc = cls.MetaOapg.discriminator() - if disc_property_name not in disc: - return None - discriminated_cls = disc[disc_property_name].get(disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if not hasattr(cls, 'MetaOapg'): - return None - elif not ( - hasattr(cls.MetaOapg, 'all_of') or - hasattr(cls.MetaOapg, 'one_of') or - hasattr(cls.MetaOapg, 'any_of') - ): - return None - # TODO stop traveling if a cycle is hit - if hasattr(cls.MetaOapg, 'all_of'): - for allof_cls in cls.MetaOapg.all_of(): - discriminated_cls = allof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'one_of'): - for oneof_cls in cls.MetaOapg.one_of(): - discriminated_cls = oneof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - if hasattr(cls.MetaOapg, 'any_of'): - for anyof_cls in cls.MetaOapg.any_of(): - discriminated_cls = anyof_cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=disc_payload_value) - if discriminated_cls is not None: - return discriminated_cls - return None - - -class DictBase(Discriminable, ValidatorBase): - - @classmethod - def __validate_arg_presence(cls, arg): - """ - Ensures that: - - all required arguments are passed in - - the input variable names are valid - - present in properties or - - accepted because additionalProperties exists - Exceptions will be raised if: - - invalid arguments were passed in - - a var_name is invalid if additional_properties == NotAnyTypeSchema - and var_name not in properties.__annotations__ - - required properties were not passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - seen_required_properties = set() - invalid_arguments = [] - required_property_names = getattr(cls.MetaOapg, 'required', set()) - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name in arg: - if property_name in required_property_names: - seen_required_properties.add(property_name) - elif property_name in property_annotations: - continue - elif additional_properties is not NotAnyTypeSchema: - continue - else: - invalid_arguments.append(property_name) - missing_required_arguments = list(required_property_names - seen_required_properties) - if missing_required_arguments: - missing_required_arguments.sort() - raise ApiTypeError( - "{} is missing {} required argument{}: {}".format( - cls.__name__, - len(missing_required_arguments), - "s" if len(missing_required_arguments) > 1 else "", - missing_required_arguments - ) - ) - if invalid_arguments: - invalid_arguments.sort() - raise ApiTypeError( - "{} was passed {} invalid argument{}: {}".format( - cls.__name__, - len(invalid_arguments), - "s" if len(invalid_arguments) > 1 else "", - invalid_arguments - ) - ) - - @classmethod - def __validate_args(cls, arg, validation_metadata: ValidationMetadata): - """ - Ensures that: - - values passed in for properties are valid - Exceptions will be raised if: - - invalid arguments were passed in - - Args: - arg: the input dict - - Raises: - ApiTypeError - for missing required arguments, or for invalid properties - """ - path_to_schemas = {} - additional_properties = getattr(cls.MetaOapg, 'additional_properties', UnsetAnyTypeSchema) - properties = getattr(cls.MetaOapg, 'properties', {}) - property_annotations = getattr(properties, '__annotations__', {}) - for property_name, value in arg.items(): - path_to_item = validation_metadata.path_to_item+(property_name,) - if property_name in property_annotations: - schema = property_annotations[property_name] - elif additional_properties is not NotAnyTypeSchema: - if additional_properties is UnsetAnyTypeSchema: - """ - If additionalProperties is unset and this path_to_item does not yet have - any validations on it, validate it. - If it already has validations on it, skip this validation. - """ - if path_to_item in path_to_schemas: - continue - schema = additional_properties - else: - raise ApiTypeError('Unable to find schema for value={} in class={} at path_to_item={}'.format( - value, cls, validation_metadata.path_to_item+(property_name,) - )) - schema = cls._get_class_oapg(schema) - arg_validation_metadata = ValidationMetadata( - from_server=validation_metadata.from_server, - configuration=validation_metadata.configuration, - path_to_item=path_to_item, - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if arg_validation_metadata.validation_ran_earlier(schema): - add_deeper_validated_schemas(arg_validation_metadata, path_to_schemas) - continue - other_path_to_schemas = schema._validate_oapg(value, validation_metadata=arg_validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __check_dict_validations( - cls, - arg, - validation_metadata: ValidationMetadata - ): - if not hasattr(cls, 'MetaOapg'): - return - if (cls._is_json_validation_enabled_oapg('maxProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'max_properties') and - len(arg) > cls.MetaOapg.max_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be less than or equal to", - constraint_value=cls.MetaOapg.max_properties, - path_to_item=validation_metadata.path_to_item - ) - - if (cls._is_json_validation_enabled_oapg('minProperties', validation_metadata.configuration) and - hasattr(cls.MetaOapg, 'min_properties') and - len(arg) < cls.MetaOapg.min_properties): - cls._raise_validation_error_message_oapg( - value=arg, - constraint_msg="number of properties must be greater than or equal to", - constraint_value=cls.MetaOapg.min_properties, - path_to_item=validation_metadata.path_to_item - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - DictBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - if isinstance(arg, frozendict.frozendict): - cls.__check_dict_validations(arg, validation_metadata) - _path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - if not isinstance(arg, frozendict.frozendict): - return _path_to_schemas - cls.__validate_arg_presence(arg) - other_path_to_schemas = cls.__validate_args(arg, validation_metadata=validation_metadata) - update(_path_to_schemas, other_path_to_schemas) - try: - discriminator = cls.MetaOapg.discriminator() - except AttributeError: - return _path_to_schemas - # discriminator exists - disc_prop_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_prop_name, validation_metadata, arg) - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_prop_name, disc_payload_value=arg[disc_prop_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value was passed in to {}.{} Only the values {} are allowed at {}".format( - cls.__name__, - disc_prop_name, - list(discriminator[disc_prop_name].keys()), - validation_metadata.path_to_item + (disc_prop_name,) - ) - ) - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - if updated_vm.validation_ran_earlier(discriminated_cls): - add_deeper_validated_schemas(updated_vm, _path_to_schemas) - return _path_to_schemas - other_path_to_schemas = discriminated_cls._validate_oapg(arg, validation_metadata=updated_vm) - update(_path_to_schemas, other_path_to_schemas) - return _path_to_schemas - - @classmethod - def _get_properties_oapg( - cls, - arg: typing.Dict[str, typing.Any], - path_to_item: typing.Tuple[typing.Union[str, int], ...], - path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Type['Schema']] - ): - """ - DictBase _get_properties_oapg, this is how properties are set - These values already passed validation - """ - dict_items = {} - - for property_name_js, value in arg.items(): - property_path_to_item = path_to_item + (property_name_js,) - property_cls = path_to_schemas[property_path_to_item] - new_value = property_cls._get_new_instance_without_conversion_oapg( - value, - property_path_to_item, - path_to_schemas - ) - dict_items[property_name_js] = new_value - - return dict_items - - def __setattr__(self, name: str, value: typing.Any): - if not isinstance(self, FileIO): - raise AttributeError('property setting not supported on immutable instances') - - def __getattr__(self, name: str): - """ - for instance.name access - Properties are only type hinted for required properties - so that hasattr(instance, 'optionalProp') is False when that key is not present - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - if name not in self.__class__.__annotations__: - raise AttributeError(f"{self} has no attribute '{name}'") - try: - value = self[name] - return value - except KeyError as ex: - raise AttributeError(str(ex)) - - def __getitem__(self, name: str): - """ - dict_instance[name] accessor - key errors thrown - """ - if not isinstance(self, frozendict.frozendict): - return super().__getattr__(name) - return super().__getitem__(name) - - def get_item_oapg(self, name: str) -> typing.Union['AnyTypeSchema', Unset]: - # dict_instance[name] accessor - if not isinstance(self, frozendict.frozendict): - raise NotImplementedError() - try: - return super().__getitem__(name) - except KeyError: - return unset - - -def cast_to_allowed_types( - arg: typing.Union[str, date, datetime, uuid.UUID, decimal.Decimal, int, float, None, dict, frozendict.frozendict, list, tuple, bytes, Schema, io.FileIO, io.BufferedReader], - from_server: bool, - validated_path_to_schemas: typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]], - path_to_item: typing.Tuple[typing.Union[str, int], ...] = tuple(['args[0]']), -) -> typing.Union[frozendict.frozendict, tuple, decimal.Decimal, str, bytes, BoolClass, NoneClass, FileIO]: - """ - Casts the input payload arg into the allowed types - The input validated_path_to_schemas is mutated by running this function - - When from_server is False then - - date/datetime is cast to str - - int/float is cast to Decimal - - If a Schema instance is passed in it is converted back to a primitive instance because - One may need to validate that data to the original Schema class AND additional different classes - those additional classes will need to be added to the new manufactured class for that payload - If the code didn't do this and kept the payload as a Schema instance it would fail to validate to other - Schema classes and the code wouldn't be able to mfg a new class that includes all valid schemas - TODO: store the validated schema classes in validation_metadata - - Args: - arg: the payload - from_server: whether this payload came from the server or not - validated_path_to_schemas: a dict that stores the validated classes at any path location in the payload - """ - if isinstance(arg, Schema): - # store the already run validations - schema_classes = set() - for cls in arg.__class__.__bases__: - if cls is Singleton: - # Skip Singleton - continue - schema_classes.add(cls) - validated_path_to_schemas[path_to_item] = schema_classes - - type_error = ApiTypeError(f"Invalid type. Required value type is str and passed type was {type(arg)} at {path_to_item}") - if isinstance(arg, str): - return str(arg) - elif isinstance(arg, (dict, frozendict.frozendict)): - return frozendict.frozendict({key: cast_to_allowed_types(val, from_server, validated_path_to_schemas, path_to_item + (key,)) for key, val in arg.items()}) - elif isinstance(arg, (bool, BoolClass)): - """ - this check must come before isinstance(arg, (int, float)) - because isinstance(True, int) is True - """ - if arg: - return BoolClass.TRUE - return BoolClass.FALSE - elif isinstance(arg, int): - return decimal.Decimal(arg) - elif isinstance(arg, float): - decimal_from_float = decimal.Decimal(arg) - if decimal_from_float.as_integer_ratio()[1] == 1: - # 9.0 -> Decimal('9.0') - # 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0') - return decimal.Decimal(str(decimal_from_float)+'.0') - return decimal_from_float - elif isinstance(arg, (tuple, list)): - return tuple([cast_to_allowed_types(item, from_server, validated_path_to_schemas, path_to_item + (i,)) for i, item in enumerate(arg)]) - elif isinstance(arg, (none_type, NoneClass)): - return NoneClass.NONE - elif isinstance(arg, (date, datetime)): - if not from_server: - return arg.isoformat() - raise type_error - elif isinstance(arg, uuid.UUID): - if not from_server: - return str(arg) - raise type_error - elif isinstance(arg, decimal.Decimal): - return decimal.Decimal(arg) - elif isinstance(arg, bytes): - return bytes(arg) - elif isinstance(arg, (io.FileIO, io.BufferedReader)): - return FileIO(arg) - raise ValueError('Invalid type passed in got input={} type={}'.format(arg, type(arg))) - - -class ComposedBase(Discriminable): - - @classmethod - def __get_allof_classes(cls, arg, validation_metadata: ValidationMetadata): - path_to_schemas = defaultdict(set) - for allof_cls in cls.MetaOapg.all_of(): - if validation_metadata.validation_ran_earlier(allof_cls): - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - other_path_to_schemas = allof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - update(path_to_schemas, other_path_to_schemas) - return path_to_schemas - - @classmethod - def __get_oneof_class( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata, - ): - oneof_classes = [] - path_to_schemas = defaultdict(set) - for oneof_cls in cls.MetaOapg.one_of(): - if oneof_cls in path_to_schemas[validation_metadata.path_to_item]: - oneof_classes.append(oneof_cls) - continue - if validation_metadata.validation_ran_earlier(oneof_cls): - oneof_classes.append(oneof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - try: - path_to_schemas = oneof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and oneof_cls is discriminated_cls: - raise ex - continue - oneof_classes.append(oneof_cls) - if not oneof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the oneOf schemas matched the input data.".format(cls) - ) - elif len(oneof_classes) > 1: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. Multiple " - "oneOf schemas {} matched the inputs, but a max of one is allowed.".format(cls, oneof_classes) - ) - # exactly one class matches - return path_to_schemas - - @classmethod - def __get_anyof_classes( - cls, - arg, - discriminated_cls, - validation_metadata: ValidationMetadata - ): - anyof_classes = [] - path_to_schemas = defaultdict(set) - for anyof_cls in cls.MetaOapg.any_of(): - if validation_metadata.validation_ran_earlier(anyof_cls): - anyof_classes.append(anyof_cls) - add_deeper_validated_schemas(validation_metadata, path_to_schemas) - continue - - try: - other_path_to_schemas = anyof_cls._validate_oapg(arg, validation_metadata=validation_metadata) - except (ApiValueError, ApiTypeError) as ex: - if discriminated_cls is not None and anyof_cls is discriminated_cls: - raise ex - continue - anyof_classes.append(anyof_cls) - update(path_to_schemas, other_path_to_schemas) - if not anyof_classes: - raise ApiValueError( - "Invalid inputs given to generate an instance of {}. None " - "of the anyOf schemas matched the input data.".format(cls) - ) - return path_to_schemas - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ) -> typing.Dict[typing.Tuple[typing.Union[str, int], ...], typing.Set[typing.Union['Schema', str, decimal.Decimal, BoolClass, NoneClass, frozendict.frozendict, tuple]]]: - """ - ComposedBase _validate_oapg - We return dynamic classes of different bases depending upon the inputs - This makes it so: - - the returned instance is always a subclass of our defining schema - - this allows us to check type based on whether an instance is a subclass of a schema - - the returned instance is a serializable type (except for None, True, and False) which are enums - - Returns: - new_cls (type): the new class - - Raises: - ApiValueError: when a string can't be converted into a date or datetime and it must be one of those classes - ApiTypeError: when the input type is not in the list of allowed spec types - """ - # validation checking on types, validations, and enums - path_to_schemas = super()._validate_oapg(arg, validation_metadata=validation_metadata) - - updated_vm = ValidationMetadata( - configuration=validation_metadata.configuration, - from_server=validation_metadata.from_server, - path_to_item=validation_metadata.path_to_item, - seen_classes=validation_metadata.seen_classes | frozenset({cls}), - validated_path_to_schemas=validation_metadata.validated_path_to_schemas - ) - - # process composed schema - discriminator = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'discriminator'): - discriminator = cls.MetaOapg.discriminator() - discriminated_cls = None - if discriminator and arg and isinstance(arg, frozendict.frozendict): - disc_property_name = list(discriminator.keys())[0] - cls._ensure_discriminator_value_present_oapg(disc_property_name, updated_vm, arg) - # get discriminated_cls by looking at the dict in the current class - discriminated_cls = cls.get_discriminated_class_oapg( - disc_property_name=disc_property_name, disc_payload_value=arg[disc_property_name]) - if discriminated_cls is None: - raise ApiValueError( - "Invalid discriminator value '{}' was passed in to {}.{} Only the values {} are allowed at {}".format( - arg[disc_property_name], - cls.__name__, - disc_property_name, - list(discriminator[disc_property_name].keys()), - updated_vm.path_to_item + (disc_property_name,) - ) - ) - - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'all_of'): - other_path_to_schemas = cls.__get_allof_classes(arg, validation_metadata=updated_vm) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'one_of'): - other_path_to_schemas = cls.__get_oneof_class( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'any_of'): - other_path_to_schemas = cls.__get_anyof_classes( - arg, - discriminated_cls=discriminated_cls, - validation_metadata=updated_vm - ) - update(path_to_schemas, other_path_to_schemas) - not_cls = None - if hasattr(cls, 'MetaOapg') and hasattr(cls.MetaOapg, 'not_schema'): - not_cls = cls.MetaOapg.not_schema - not_cls = cls._get_class_oapg(not_cls) - if not_cls: - other_path_to_schemas = None - not_exception = ApiValueError( - "Invalid value '{}' was passed in to {}. Value is invalid because it is disallowed by {}".format( - arg, - cls.__name__, - not_cls.__name__, - ) - ) - if updated_vm.validation_ran_earlier(not_cls): - raise not_exception - - try: - other_path_to_schemas = not_cls._validate_oapg(arg, validation_metadata=updated_vm) - except (ApiValueError, ApiTypeError): - pass - if other_path_to_schemas: - raise not_exception - - if discriminated_cls is not None and not updated_vm.validation_ran_earlier(discriminated_cls): - # TODO use an exception from this package here - add_deeper_validated_schemas(updated_vm, path_to_schemas) - assert discriminated_cls in path_to_schemas[updated_vm.path_to_item] - return path_to_schemas - - -# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase -class ComposedSchema( - ComposedBase, - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolMixin -): - @classmethod - def from_openapi_data_oapg(cls, *args: typing.Any, _configuration: typing.Optional[Configuration] = None, **kwargs): - if not args: - if not kwargs: - raise ApiTypeError('{} is missing required input data in args or kwargs'.format(cls.__name__)) - args = (kwargs, ) - return super().from_openapi_data_oapg(args[0], _configuration=_configuration) - - -class ListSchema( - ListBase, - Schema, - TupleMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.List[typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[typing.List[typing.Any], typing.Tuple[typing.Any]], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NoneSchema( - NoneBase, - Schema, - NoneMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: None, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: None, **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class NumberSchema( - NumberBase, - Schema, - DecimalMixin -): - """ - This is used for type: number with no format - Both integers AND floats are accepted - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Union[int, float], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int, float], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class IntBase: - @property - def as_int_oapg(self) -> int: - try: - return self._as_int - except AttributeError: - self._as_int = int(self) - return self._as_int - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - - denominator = arg.as_integer_ratio()[-1] - if denominator != 1: - raise ApiValueError( - "Invalid value '{}' for type integer at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - IntBase _validate_oapg - TODO what about types = (int, number) -> IntBase, NumberBase? We could drop int and keep number only - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class IntSchema(IntBase, NumberSchema): - - @classmethod - def from_openapi_data_oapg(cls, arg: int, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[decimal.Decimal, int], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class Int32Base: - __inclusive_minimum = decimal.Decimal(-2147483648) - __inclusive_maximum = decimal.Decimal(2147483647) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int32 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int32Schema( - Int32Base, - IntSchema -): - pass - - -class Int64Base: - __inclusive_minimum = decimal.Decimal(-9223372036854775808) - __inclusive_maximum = decimal.Decimal(9223372036854775807) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal) and arg.as_tuple().exponent == 0: - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type int64 at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Int64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Int64Schema( - Int64Base, - IntSchema -): - pass - - -class Float32Base: - __inclusive_minimum = decimal.Decimal(-3.4028234663852886e+38) - __inclusive_maximum = decimal.Decimal(3.4028234663852886e+38) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type float at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float32Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - - -class Float32Schema( - Float32Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class Float64Base: - __inclusive_minimum = decimal.Decimal(-1.7976931348623157E+308) - __inclusive_maximum = decimal.Decimal(1.7976931348623157E+308) - - @classmethod - def __validate_format(cls, arg: typing.Optional[decimal.Decimal], validation_metadata: ValidationMetadata): - if isinstance(arg, decimal.Decimal): - if not cls.__inclusive_minimum <= arg <= cls.__inclusive_maximum: - raise ApiValueError( - "Invalid value '{}' for type double at {}".format(arg, validation_metadata.path_to_item) - ) - - @classmethod - def _validate_oapg( - cls, - arg, - validation_metadata: ValidationMetadata, - ): - """ - Float64Base _validate_oapg - """ - cls.__validate_format(arg, validation_metadata=validation_metadata) - return super()._validate_oapg(arg, validation_metadata=validation_metadata) - -class Float64Schema( - Float64Base, - NumberSchema -): - - @classmethod - def from_openapi_data_oapg(cls, arg: float, _configuration: typing.Optional[Configuration] = None): - # todo check format - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - -class StrSchema( - StrBase, - Schema, - StrMixin -): - """ - date + datetime string types must inherit from this class - That is because one can validate a str payload as both: - - type: string (format unset) - - type: string, format: date - """ - - @classmethod - def from_openapi_data_oapg(cls, arg: str, _configuration: typing.Optional[Configuration] = None) -> 'StrSchema': - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: typing.Union[str, date, datetime, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class UUIDSchema(UUIDBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, uuid.UUID], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateSchema(DateBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, date], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DateTimeSchema(DateTimeBase, StrSchema): - - def __new__(cls, _arg: typing.Union[str, datetime], **kwargs: Configuration): - return super().__new__(cls, _arg, **kwargs) - - -class DecimalSchema(DecimalBase, StrSchema): - - def __new__(cls, _arg: str, **kwargs: Configuration): - """ - Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads - which can be simple (str) or complex (dicts or lists with nested values) - Because casting is only done once and recursively casts all values prior to validation then for a potential - client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know - if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema - where it should stay as Decimal. - """ - return super().__new__(cls, _arg, **kwargs) - - -class BytesSchema( - Schema, - BytesMixin -): - """ - this class will subclass bytes and is immutable - """ - def __new__(cls, _arg: bytes, **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class FileSchema( - Schema, - FileMixin -): - """ - This class is NOT immutable - Dynamic classes are built using it for example when AnyType allows in binary data - Al other schema classes ARE immutable - If one wanted to make this immutable one could make this a DictSchema with required properties: - - data = BytesSchema (which would be an immutable bytes based schema) - - file_name = StrSchema - and cast_to_allowed_types would convert bytes and file instances into dicts containing data + file_name - The downside would be that data would be stored in memory which one may not want to do for very large files - - The developer is responsible for closing this file and deleting it - - This class was kept as mutable: - - to allow file reading and writing to disk - - to be able to preserve file name info - """ - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader], **kwargs: Configuration): - return super(Schema, cls).__new__(cls, _arg) - - -class BinaryBase: - pass - - -class BinarySchema( - ComposedBase, - BinaryBase, - Schema, - BinaryMixin -): - class MetaOapg: - @staticmethod - def one_of(): - return [ - BytesSchema, - FileSchema, - ] - - def __new__(cls, _arg: typing.Union[io.FileIO, io.BufferedReader, bytes], **kwargs: Configuration): - return super().__new__(cls, _arg) - - -class BoolSchema( - BoolBase, - Schema, - BoolMixin -): - - @classmethod - def from_openapi_data_oapg(cls, arg: bool, _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, _arg: bool, **kwargs: ValidationMetadata): - return super().__new__(cls, _arg, **kwargs) - - -class AnyTypeSchema( - DictBase, - ListBase, - NumberBase, - StrBase, - BoolBase, - NoneBase, - Schema, - NoneFrozenDictTupleStrDecimalBoolFileBytesMixin -): - # Python representation of a schema defined as true or {} - pass - - -class UnsetAnyTypeSchema(AnyTypeSchema): - # Used when additionalProperties/items was not explicitly defined and a defining schema is needed - pass - - -class NotAnyTypeSchema( - ComposedSchema, -): - """ - Python representation of a schema defined as false or {'not': {}} - Does not allow inputs in of AnyType - Note: validations on this class are never run because the code knows that no inputs will ever validate - """ - - class MetaOapg: - not_schema = AnyTypeSchema - - def __new__( - cls, - *_args, - _configuration: typing.Optional[Configuration] = None, - ) -> 'NotAnyTypeSchema': - return super().__new__( - cls, - *_args, - _configuration=_configuration, - ) - - -class DictSchema( - DictBase, - Schema, - FrozenDictMixin -): - @classmethod - def from_openapi_data_oapg(cls, arg: typing.Dict[str, typing.Any], _configuration: typing.Optional[Configuration] = None): - return super().from_openapi_data_oapg(arg, _configuration=_configuration) - - def __new__(cls, *_args: typing.Union[dict, frozendict.frozendict], **kwargs: typing.Union[dict, frozendict.frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, ValidationMetadata]): - return super().__new__(cls, *_args, **kwargs) - - -schema_type_classes = {NoneSchema, DictSchema, ListSchema, NumberSchema, StrSchema, BoolSchema, AnyTypeSchema} - - -@functools.lru_cache() -def get_new_class( - class_name: str, - bases: typing.Tuple[typing.Type[typing.Union[Schema, typing.Any]], ...] -) -> typing.Type[Schema]: - """ - Returns a new class that is made with the subclass bases - """ - new_cls: typing.Type[Schema] = type(class_name, bases, {}) - return new_cls - - -LOG_CACHE_USAGE = False - - -def log_cache_usage(cache_fn): - if LOG_CACHE_USAGE: - print(cache_fn.__name__, cache_fn.cache_info()) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/petstore_api/signing.py b/samples/openapi3/client/petstore/python/petstore_api/signing.py deleted file mode 100644 index 9a6e9e460ec..00000000000 --- a/samples/openapi3/client/petstore/python/petstore_api/signing.py +++ /dev/null @@ -1,416 +0,0 @@ -# coding: utf-8 -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from base64 import b64encode -from Crypto.IO import PEM, PKCS8 -from Crypto.Hash import SHA256, SHA512 -from Crypto.PublicKey import RSA, ECC -from Crypto.Signature import PKCS1_v1_5, pss, DSS -from email.utils import formatdate -import json -import os -import re -from time import time -from urllib.parse import urlencode, urlparse - -# The constants below define a subset of HTTP headers that can be included in the -# HTTP signature scheme. Additional headers may be included in the signature. - -# The '(request-target)' header is a calculated field that includes the HTTP verb, -# the URL path and the URL query. -HEADER_REQUEST_TARGET = '(request-target)' -# The time when the HTTP signature was generated. -HEADER_CREATED = '(created)' -# The time when the HTTP signature expires. The API server should reject HTTP requests -# that have expired. -HEADER_EXPIRES = '(expires)' -# The 'Host' header. -HEADER_HOST = 'Host' -# The 'Date' header. -HEADER_DATE = 'Date' -# When the 'Digest' header is included in the HTTP signature, the client automatically -# computes the digest of the HTTP request body, per RFC 3230. -HEADER_DIGEST = 'Digest' -# The 'Authorization' header is automatically generated by the client. It includes -# the list of signed headers and a base64-encoded signature. -HEADER_AUTHORIZATION = 'Authorization' - -# The constants below define the cryptographic schemes for the HTTP signature scheme. -SCHEME_HS2019 = 'hs2019' -SCHEME_RSA_SHA256 = 'rsa-sha256' -SCHEME_RSA_SHA512 = 'rsa-sha512' - -# The constants below define the signature algorithms that can be used for the HTTP -# signature scheme. -ALGORITHM_RSASSA_PSS = 'RSASSA-PSS' -ALGORITHM_RSASSA_PKCS1v15 = 'RSASSA-PKCS1-v1_5' - -ALGORITHM_ECDSA_MODE_FIPS_186_3 = 'fips-186-3' -ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 = 'deterministic-rfc6979' -ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS = { - ALGORITHM_ECDSA_MODE_FIPS_186_3, - ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979 -} - -# The cryptographic hash algorithm for the message signature. -HASH_SHA256 = 'sha256' -HASH_SHA512 = 'sha512' - - -class HttpSigningConfiguration(object): - """The configuration parameters for the HTTP signature security scheme. - The HTTP signature security scheme is used to sign HTTP requests with a private key - which is in possession of the API client. - An 'Authorization' header is calculated by creating a hash of select headers, - and optionally the body of the HTTP request, then signing the hash value using - a private key. The 'Authorization' header is added to outbound HTTP requests. - - NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :param key_id: A string value specifying the identifier of the cryptographic key, - when signing HTTP requests. - :param signing_scheme: A string value specifying the signature scheme, when - signing HTTP requests. - Supported value are hs2019, rsa-sha256, rsa-sha512. - Avoid using rsa-sha256, rsa-sha512 as they are deprecated. These values are - available for server-side applications that only support the older - HTTP signature algorithms. - :param private_key_path: A string value specifying the path of the file containing - a private key. The private key is used to sign HTTP requests. - :param private_key_passphrase: A string value specifying the passphrase to decrypt - the private key. - :param signed_headers: A list of strings. Each value is the name of a HTTP header - that must be included in the HTTP signature calculation. - The two special signature headers '(request-target)' and '(created)' SHOULD be - included in SignedHeaders. - The '(created)' header expresses when the signature was created. - The '(request-target)' header is a concatenation of the lowercased :method, an - ASCII space, and the :path pseudo-headers. - When signed_headers is not specified, the client defaults to a single value, - '(created)', in the list of HTTP headers. - When SignedHeaders contains the 'Digest' value, the client performs the - following operations: - 1. Calculate a digest of request body, as specified in RFC3230, section 4.3.2. - 2. Set the 'Digest' header in the request body. - 3. Include the 'Digest' header and value in the HTTP signature. - :param signing_algorithm: A string value specifying the signature algorithm, when - signing HTTP requests. - Supported values are: - 1. For RSA keys: RSASSA-PSS, RSASSA-PKCS1-v1_5. - 2. For ECDSA keys: fips-186-3, deterministic-rfc6979. - If None, the signing algorithm is inferred from the private key. - The default signing algorithm for RSA keys is RSASSA-PSS. - The default signing algorithm for ECDSA keys is fips-186-3. - :param hash_algorithm: The hash algorithm for the signature. Supported values are - sha256 and sha512. - If the signing_scheme is rsa-sha256, the hash algorithm must be set - to None or sha256. - If the signing_scheme is rsa-sha512, the hash algorithm must be set - to None or sha512. - :param signature_max_validity: The signature max validity, expressed as - a datetime.timedelta value. It must be a positive value. - """ - def __init__(self, key_id, signing_scheme, private_key_path, - private_key_passphrase=None, - signed_headers=None, - signing_algorithm=None, - hash_algorithm=None, - signature_max_validity=None): - self.key_id = key_id - if signing_scheme not in {SCHEME_HS2019, SCHEME_RSA_SHA256, SCHEME_RSA_SHA512}: - raise Exception("Unsupported security scheme: {0}".format(signing_scheme)) - self.signing_scheme = signing_scheme - if not os.path.exists(private_key_path): - raise Exception("Private key file does not exist") - self.private_key_path = private_key_path - self.private_key_passphrase = private_key_passphrase - self.signing_algorithm = signing_algorithm - self.hash_algorithm = hash_algorithm - if signing_scheme == SCHEME_RSA_SHA256: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA256 - elif self.hash_algorithm != HASH_SHA256: - raise Exception("Hash algorithm must be sha256 when security scheme is %s" % - SCHEME_RSA_SHA256) - elif signing_scheme == SCHEME_RSA_SHA512: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA512 - elif self.hash_algorithm != HASH_SHA512: - raise Exception("Hash algorithm must be sha512 when security scheme is %s" % - SCHEME_RSA_SHA512) - elif signing_scheme == SCHEME_HS2019: - if self.hash_algorithm is None: - self.hash_algorithm = HASH_SHA256 - elif self.hash_algorithm not in {HASH_SHA256, HASH_SHA512}: - raise Exception("Invalid hash algorithm") - if signature_max_validity is not None and signature_max_validity.total_seconds() < 0: - raise Exception("The signature max validity must be a positive value") - self.signature_max_validity = signature_max_validity - # If the user has not provided any signed_headers, the default must be set to '(created)', - # as specified in the 'HTTP signature' standard. - if signed_headers is None or len(signed_headers) == 0: - signed_headers = [HEADER_CREATED] - if self.signature_max_validity is None and HEADER_EXPIRES in signed_headers: - raise Exception( - "Signature max validity must be set when " - "'(expires)' signature parameter is specified") - if len(signed_headers) != len(set(signed_headers)): - raise Exception("Cannot have duplicates in the signed_headers parameter") - if HEADER_AUTHORIZATION in signed_headers: - raise Exception("'Authorization' header cannot be included in signed headers") - self.signed_headers = signed_headers - self.private_key = None - """The private key used to sign HTTP requests. - Initialized when the PEM-encoded private key is loaded from a file. - """ - self.host = None - """The host name, optionally followed by a colon and TCP port number. - """ - self._load_private_key() - - def get_http_signature_headers(self, resource_path, method, headers, body, query_params): - """Create a cryptographic message signature for the HTTP request and add the signed headers. - - :param resource_path : A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method, e.g. GET, POST. - :param headers: A dict containing the HTTP request headers. - :param body: The object representing the HTTP request body. - :param query_params: A string representing the HTTP request query parameters. - :return: A dict of HTTP headers that must be added to the outbound HTTP request. - """ - if method is None: - raise Exception("HTTP method must be set") - if resource_path is None: - raise Exception("Resource path must be set") - - signed_headers_list, request_headers_dict = self._get_signed_header_info( - resource_path, method, headers, body, query_params) - - header_items = [ - "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] - string_to_sign = "\n".join(header_items) - - digest, digest_prefix = self._get_message_digest(string_to_sign.encode()) - b64_signed_msg = self._sign_digest(digest) - - request_headers_dict[HEADER_AUTHORIZATION] = self._get_authorization_header( - signed_headers_list, b64_signed_msg) - - return request_headers_dict - - def get_public_key(self): - """Returns the public key object associated with the private key. - """ - pubkey = None - if isinstance(self.private_key, RSA.RsaKey): - pubkey = self.private_key.publickey() - elif isinstance(self.private_key, ECC.EccKey): - pubkey = self.private_key.public_key() - return pubkey - - def _load_private_key(self): - """Load the private key used to sign HTTP requests. - The private key is used to sign HTTP requests as defined in - https://datatracker.ietf.org/doc/draft-cavage-http-signatures/. - """ - if self.private_key is not None: - return - with open(self.private_key_path, 'r') as f: - pem_data = f.read() - # Verify PEM Pre-Encapsulation Boundary - r = re.compile(r"\s*-----BEGIN (.*)-----\s+") - m = r.match(pem_data) - if not m: - raise ValueError("Not a valid PEM pre boundary") - pem_header = m.group(1) - if pem_header == 'RSA PRIVATE KEY': - self.private_key = RSA.importKey(pem_data, self.private_key_passphrase) - elif pem_header == 'EC PRIVATE KEY': - self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) - elif pem_header in {'PRIVATE KEY', 'ENCRYPTED PRIVATE KEY'}: - # Key is in PKCS8 format, which is capable of holding many different - # types of private keys, not just EC keys. - (key_binary, pem_header, is_encrypted) = \ - PEM.decode(pem_data, self.private_key_passphrase) - (oid, privkey, params) = \ - PKCS8.unwrap(key_binary, passphrase=self.private_key_passphrase) - if oid == '1.2.840.10045.2.1': - self.private_key = ECC.import_key(pem_data, self.private_key_passphrase) - else: - raise Exception("Unsupported key: {0}. OID: {1}".format(pem_header, oid)) - else: - raise Exception("Unsupported key: {0}".format(pem_header)) - # Validate the specified signature algorithm is compatible with the private key. - if self.signing_algorithm is not None: - supported_algs = None - if isinstance(self.private_key, RSA.RsaKey): - supported_algs = {ALGORITHM_RSASSA_PSS, ALGORITHM_RSASSA_PKCS1v15} - elif isinstance(self.private_key, ECC.EccKey): - supported_algs = ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS - if supported_algs is not None and self.signing_algorithm not in supported_algs: - raise Exception( - "Signing algorithm {0} is not compatible with private key".format( - self.signing_algorithm)) - - def _get_signed_header_info(self, resource_path, method, headers, body, query_params): - """Build the HTTP headers (name, value) that need to be included in - the HTTP signature scheme. - - :param resource_path : A string representation of the HTTP request resource path. - :param method: A string representation of the HTTP request method, e.g. GET, POST. - :param headers: A dict containing the HTTP request headers. - :param body: The object (e.g. a dict) representing the HTTP request body. - :param query_params: A string representing the HTTP request query parameters. - :return: A tuple containing two dict objects: - The first dict contains the HTTP headers that are used to calculate - the HTTP signature. - The second dict contains the HTTP headers that must be added to - the outbound HTTP request. - """ - - if body is None: - body = '' - else: - body = json.dumps(body) - - # Build the '(request-target)' HTTP signature parameter. - target_host = urlparse(self.host).netloc - target_path = urlparse(self.host).path - request_target = method.lower() + " " + target_path + resource_path - if query_params: - request_target += "?" + urlencode(query_params) - - # Get UNIX time, e.g. seconds since epoch, not including leap seconds. - now = time() - # Format date per RFC 7231 section-7.1.1.2. An example is: - # Date: Wed, 21 Oct 2015 07:28:00 GMT - cdate = formatdate(timeval=now, localtime=False, usegmt=True) - # The '(created)' value MUST be a Unix timestamp integer value. - # Subsecond precision is not supported. - created = int(now) - if self.signature_max_validity is not None: - expires = now + self.signature_max_validity.total_seconds() - - signed_headers_list = [] - request_headers_dict = {} - for hdr_key in self.signed_headers: - hdr_key = hdr_key.lower() - if hdr_key == HEADER_REQUEST_TARGET: - value = request_target - elif hdr_key == HEADER_CREATED: - value = '{0}'.format(created) - elif hdr_key == HEADER_EXPIRES: - value = '{0}'.format(expires) - elif hdr_key == HEADER_DATE.lower(): - value = cdate - request_headers_dict[HEADER_DATE] = '{0}'.format(cdate) - elif hdr_key == HEADER_DIGEST.lower(): - request_body = body.encode() - body_digest, digest_prefix = self._get_message_digest(request_body) - b64_body_digest = b64encode(body_digest.digest()) - value = digest_prefix + b64_body_digest.decode('ascii') - request_headers_dict[HEADER_DIGEST] = '{0}{1}'.format( - digest_prefix, b64_body_digest.decode('ascii')) - elif hdr_key == HEADER_HOST.lower(): - value = target_host - request_headers_dict[HEADER_HOST] = '{0}'.format(target_host) - else: - value = next((v for k, v in headers.items() if k.lower() == hdr_key), None) - if value is None: - raise Exception( - "Cannot sign HTTP request. " - "Request does not contain the '{0}' header".format(hdr_key)) - signed_headers_list.append((hdr_key, value)) - - return signed_headers_list, request_headers_dict - - def _get_message_digest(self, data): - """Calculates and returns a cryptographic digest of a specified HTTP request. - - :param data: The string representation of the date to be hashed with a cryptographic hash. - :return: A tuple of (digest, prefix). - The digest is a hashing object that contains the cryptographic digest of - the HTTP request. - The prefix is a string that identifies the cryptographic hash. It is used - to generate the 'Digest' header as specified in RFC 3230. - """ - if self.hash_algorithm == HASH_SHA512: - digest = SHA512.new() - prefix = 'SHA-512=' - elif self.hash_algorithm == HASH_SHA256: - digest = SHA256.new() - prefix = 'SHA-256=' - else: - raise Exception("Unsupported hash algorithm: {0}".format(self.hash_algorithm)) - digest.update(data) - return digest, prefix - - def _sign_digest(self, digest): - """Signs a message digest with a private key specified in the signing_info. - - :param digest: A hashing object that contains the cryptographic digest of the HTTP request. - :return: A base-64 string representing the cryptographic signature of the input digest. - """ - sig_alg = self.signing_algorithm - if isinstance(self.private_key, RSA.RsaKey): - if sig_alg is None or sig_alg == ALGORITHM_RSASSA_PSS: - # RSASSA-PSS in Section 8.1 of RFC8017. - signature = pss.new(self.private_key).sign(digest) - elif sig_alg == ALGORITHM_RSASSA_PKCS1v15: - # RSASSA-PKCS1-v1_5 in Section 8.2 of RFC8017. - signature = PKCS1_v1_5.new(self.private_key).sign(digest) - else: - raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) - elif isinstance(self.private_key, ECC.EccKey): - if sig_alg is None: - sig_alg = ALGORITHM_ECDSA_MODE_FIPS_186_3 - if sig_alg in ALGORITHM_ECDSA_KEY_SIGNING_ALGORITHMS: - # draft-ietf-httpbis-message-signatures-00 does not specify the ECDSA encoding. - # Issue: https://github.com/w3c-ccg/http-signatures/issues/107 - signature = DSS.new(key=self.private_key, mode=sig_alg, - encoding='der').sign(digest) - else: - raise Exception("Unsupported signature algorithm: {0}".format(sig_alg)) - else: - raise Exception("Unsupported private key: {0}".format(type(self.private_key))) - return b64encode(signature) - - def _get_authorization_header(self, signed_headers, signed_msg): - """Calculates and returns the value of the 'Authorization' header when signing HTTP requests. - - :param signed_headers : A list of tuples. Each value is the name of a HTTP header that - must be included in the HTTP signature calculation. - :param signed_msg: A base-64 encoded string representation of the signature. - :return: The string value of the 'Authorization' header, representing the signature - of the HTTP request. - """ - created_ts = None - expires_ts = None - for k, v in signed_headers: - if k == HEADER_CREATED: - created_ts = v - elif k == HEADER_EXPIRES: - expires_ts = v - lower_keys = [k.lower() for k, v in signed_headers] - headers_value = " ".join(lower_keys) - - auth_str = "Signature keyId=\"{0}\",algorithm=\"{1}\",".format( - self.key_id, self.signing_scheme) - if created_ts is not None: - auth_str = auth_str + "created={0},".format(created_ts) - if expires_ts is not None: - auth_str = auth_str + "expires={0},".format(expires_ts) - auth_str = auth_str + "headers=\"{0}\",signature=\"{1}\"".format( - headers_value, signed_msg.decode('ascii')) - - return auth_str diff --git a/samples/openapi3/client/petstore/python/pom.xml b/samples/openapi3/client/petstore/python/pom.xml deleted file mode 100644 index 7e737c36111..00000000000 --- a/samples/openapi3/client/petstore/python/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PythonExperimentalOAS3PetstoreTests - pom - 1.0-SNAPSHOT - Python Experimental OpenAPI3 Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - test - integration-test - - exec - - - make - - test - - - - - - - - \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/requirements.txt b/samples/openapi3/client/petstore/python/requirements.txt deleted file mode 100644 index 342f6630cb7..00000000000 --- a/samples/openapi3/client/petstore/python/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -certifi >= 14.5.14 -frozendict ~= 2.3.4 -pem >= 19.3.0 -pycryptodome >= 3.9.0 -python-dateutil ~= 2.7.0 -setuptools >= 21.0.0 -typing_extensions ~= 4.3.0 -urllib3 ~= 1.26.7 diff --git a/samples/openapi3/client/petstore/python/setup.cfg b/samples/openapi3/client/petstore/python/setup.cfg deleted file mode 100644 index 11433ee875a..00000000000 --- a/samples/openapi3/client/petstore/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/samples/openapi3/client/petstore/python/setup.py b/samples/openapi3/client/petstore/python/setup.py deleted file mode 100644 index 992aa9853b7..00000000000 --- a/samples/openapi3/client/petstore/python/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "petstore-api" -VERSION = "1.0.0" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "certifi >= 14.5.14", - "frozendict ~= 2.3.4", - "pem >= 19.3.0", - "pycryptodome >= 3.9.0", - "python-dateutil ~= 2.7.0", - "setuptools >= 21.0.0", - "typing_extensions ~= 4.3.0", - "urllib3 ~= 1.26.7", -] - -setup( - name=NAME, - version=VERSION, - description="OpenAPI Petstore", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"], - python_requires=">=3.7", - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - license="Apache-2.0", - long_description="""\ - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - """ -) diff --git a/samples/openapi3/client/petstore/python/test-requirements.txt b/samples/openapi3/client/petstore/python/test-requirements.txt deleted file mode 100644 index 36d9b4fa7a8..00000000000 --- a/samples/openapi3/client/petstore/python/test-requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -pytest~=4.6.7 # needed for python 3.4 -pytest-cov>=2.8.1 -pytest-randomly==1.2.3 # needed for python 3.4 -pycryptodome>=3.9.0 diff --git a/samples/openapi3/client/petstore/python/test/__init__.py b/samples/openapi3/client/petstore/python/test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_models/__init__.py b/samples/openapi3/client/petstore/python/test/test_models/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_class.py deleted file mode 100644 index 672b8b4876b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_class.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.additional_properties_class import AdditionalPropertiesClass -from petstore_api import configuration - - -class TestAdditionalPropertiesClass(unittest.TestCase): - """AdditionalPropertiesClass unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_validator.py b/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_validator.py deleted file mode 100644 index fa0fe198d79..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_validator.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.additional_properties_validator import AdditionalPropertiesValidator -from petstore_api import configuration - - -class TestAdditionalPropertiesValidator(unittest.TestCase): - """AdditionalPropertiesValidator unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_with_array_of_enums.py deleted file mode 100644 index 02669a5f7f3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_additional_properties_with_array_of_enums.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.additional_properties_with_array_of_enums import AdditionalPropertiesWithArrayOfEnums -from petstore_api import configuration - - -class TestAdditionalPropertiesWithArrayOfEnums(unittest.TestCase): - """AdditionalPropertiesWithArrayOfEnums unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_address.py b/samples/openapi3/client/petstore/python/test/test_models/test_address.py deleted file mode 100644 index 4bd63aebe19..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_address.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.address import Address -from petstore_api import configuration - - -class TestAddress(unittest.TestCase): - """Address unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_animal.py b/samples/openapi3/client/petstore/python/test/test_models/test_animal.py deleted file mode 100644 index 4a9b77d617d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_animal.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.animal import Animal -from petstore_api import configuration - - -class TestAnimal(unittest.TestCase): - """Animal unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_animal_farm.py b/samples/openapi3/client/petstore/python/test/test_models/test_animal_farm.py deleted file mode 100644 index 4237b91351c..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_animal_farm.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.animal_farm import AnimalFarm -from petstore_api import configuration - - -class TestAnimalFarm(unittest.TestCase): - """AnimalFarm unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_any_type_and_format.py b/samples/openapi3/client/petstore/python/test/test_models/test_any_type_and_format.py deleted file mode 100644 index dbd95d3b024..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_any_type_and_format.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.any_type_and_format import AnyTypeAndFormat -from petstore_api import configuration - - -class TestAnyTypeAndFormat(unittest.TestCase): - """AnyTypeAndFormat unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_any_type_not_string.py b/samples/openapi3/client/petstore/python/test/test_models/test_any_type_not_string.py deleted file mode 100644 index 74de79873d3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_any_type_not_string.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.any_type_not_string import AnyTypeNotString -from petstore_api import configuration - - -class TestAnyTypeNotString(unittest.TestCase): - """AnyTypeNotString unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_api_response.py b/samples/openapi3/client/petstore/python/test/test_models/test_api_response.py deleted file mode 100644 index 2631b83ff3d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_api_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.api_response import ApiResponse -from petstore_api import configuration - - -class TestApiResponse(unittest.TestCase): - """ApiResponse unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_apple.py b/samples/openapi3/client/petstore/python/test/test_models/test_apple.py deleted file mode 100644 index 66c9241a73e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_apple.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.apple import Apple -from petstore_api import configuration - - -class TestApple(unittest.TestCase): - """Apple unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_apple_req.py b/samples/openapi3/client/petstore/python/test/test_models/test_apple_req.py deleted file mode 100644 index 4d20e890cff..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_apple_req.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.apple_req import AppleReq -from petstore_api import configuration - - -class TestAppleReq(unittest.TestCase): - """AppleReq unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_holding_any_type.py deleted file mode 100644 index bb9a2603a01..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_holding_any_type.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType -from petstore_api import configuration - - -class TestArrayHoldingAnyType(unittest.TestCase): - """ArrayHoldingAnyType unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_of_array_of_number_only.py deleted file mode 100644 index 9991efe6573..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_array_of_number_only.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly -from petstore_api import configuration - - -class TestArrayOfArrayOfNumberOnly(unittest.TestCase): - """ArrayOfArrayOfNumberOnly unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_enums.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_of_enums.py deleted file mode 100644 index 1040dabae94..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_enums.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_of_enums import ArrayOfEnums -from petstore_api import configuration - - -class TestArrayOfEnums(unittest.TestCase): - """ArrayOfEnums unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_number_only.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_of_number_only.py deleted file mode 100644 index 9eca2c7a9ee..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_of_number_only.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_of_number_only import ArrayOfNumberOnly -from petstore_api import configuration - - -class TestArrayOfNumberOnly(unittest.TestCase): - """ArrayOfNumberOnly unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_test.py deleted file mode 100644 index 3c5610cd20b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_test import ArrayTest -from petstore_api import configuration - - -class TestArrayTest(unittest.TestCase): - """ArrayTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/test/test_models/test_array_with_validations_in_items.py deleted file mode 100644 index 6c38306b1e4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_array_with_validations_in_items.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api import configuration - - -class TestArrayWithValidationsInItems(unittest.TestCase): - """ArrayWithValidationsInItems unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_banana.py b/samples/openapi3/client/petstore/python/test/test_models/test_banana.py deleted file mode 100644 index a0406ea1b8f..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_banana.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.banana import Banana -from petstore_api import configuration - - -class TestBanana(unittest.TestCase): - """Banana unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_banana_req.py b/samples/openapi3/client/petstore/python/test/test_models/test_banana_req.py deleted file mode 100644 index 39ac3c40453..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_banana_req.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.banana_req import BananaReq -from petstore_api import configuration - - -class TestBananaReq(unittest.TestCase): - """BananaReq unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_bar.py b/samples/openapi3/client/petstore/python/test/test_models/test_bar.py deleted file mode 100644 index 52419122ba8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_bar.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.bar import Bar -from petstore_api import configuration - - -class TestBar(unittest.TestCase): - """Bar unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_basque_pig.py b/samples/openapi3/client/petstore/python/test/test_models/test_basque_pig.py deleted file mode 100644 index f21a84f4dcf..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_basque_pig.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.basque_pig import BasquePig -from petstore_api import configuration - - -class TestBasquePig(unittest.TestCase): - """BasquePig unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_boolean.py b/samples/openapi3/client/petstore/python/test/test_models/test_boolean.py deleted file mode 100644 index cb65350ae50..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_boolean.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.boolean import Boolean -from petstore_api import configuration - - -class TestBoolean(unittest.TestCase): - """Boolean unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_boolean_enum.py b/samples/openapi3/client/petstore/python/test/test_models/test_boolean_enum.py deleted file mode 100644 index 0a1a1fa3cb8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_boolean_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.boolean_enum import BooleanEnum -from petstore_api import configuration - - -class TestBooleanEnum(unittest.TestCase): - """BooleanEnum unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_capitalization.py b/samples/openapi3/client/petstore/python/test/test_models/test_capitalization.py deleted file mode 100644 index a595cfd15ad..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_capitalization.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.capitalization import Capitalization -from petstore_api import configuration - - -class TestCapitalization(unittest.TestCase): - """Capitalization unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_cat.py b/samples/openapi3/client/petstore/python/test/test_models/test_cat.py deleted file mode 100644 index c8330904ba1..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_cat.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.cat import Cat -from petstore_api import configuration - - -class TestCat(unittest.TestCase): - """Cat unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_category.py b/samples/openapi3/client/petstore/python/test/test_models/test_category.py deleted file mode 100644 index ef8f9dcdf46..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_category.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.category import Category -from petstore_api import configuration - - -class TestCategory(unittest.TestCase): - """Category unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_child_cat.py b/samples/openapi3/client/petstore/python/test/test_models/test_child_cat.py deleted file mode 100644 index 724f0e593c8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_child_cat.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.child_cat import ChildCat -from petstore_api import configuration - - -class TestChildCat(unittest.TestCase): - """ChildCat unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_class_model.py b/samples/openapi3/client/petstore/python/test/test_models/test_class_model.py deleted file mode 100644 index 133ffbab20b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_class_model.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.class_model import ClassModel -from petstore_api import configuration - - -class TestClassModel(unittest.TestCase): - """ClassModel unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_client.py b/samples/openapi3/client/petstore/python/test/test_models/test_client.py deleted file mode 100644 index 6849d17a0e1..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_client.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.client import Client -from petstore_api import configuration - - -class TestClient(unittest.TestCase): - """Client unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_complex_quadrilateral.py b/samples/openapi3/client/petstore/python/test/test_models/test_complex_quadrilateral.py deleted file mode 100644 index 0391cbde55d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_complex_quadrilateral.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral -from petstore_api import configuration - - -class TestComplexQuadrilateral(unittest.TestCase): - """ComplexQuadrilateral unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_any_of_different_types_no_validations.py deleted file mode 100644 index 0acd76ea3a8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_any_of_different_types_no_validations.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_any_of_different_types_no_validations import ComposedAnyOfDifferentTypesNoValidations -from petstore_api import configuration - - -class TestComposedAnyOfDifferentTypesNoValidations(unittest.TestCase): - """ComposedAnyOfDifferentTypesNoValidations unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_array.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_array.py deleted file mode 100644 index 20b69b37bc0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_array.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_array import ComposedArray -from petstore_api import configuration - - -class TestComposedArray(unittest.TestCase): - """ComposedArray unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_bool.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_bool.py deleted file mode 100644 index 24d0a279056..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_bool.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_bool import ComposedBool -from petstore_api import configuration - - -class TestComposedBool(unittest.TestCase): - """ComposedBool unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_none.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_none.py deleted file mode 100644 index 8fdacab439a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_none.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_none import ComposedNone -from petstore_api import configuration - - -class TestComposedNone(unittest.TestCase): - """ComposedNone unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_number.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_number.py deleted file mode 100644 index 14a26ab11f3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_number.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_number import ComposedNumber -from petstore_api import configuration - - -class TestComposedNumber(unittest.TestCase): - """ComposedNumber unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_object.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_object.py deleted file mode 100644 index dfc7d535604..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_object.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_object import ComposedObject -from petstore_api import configuration - - -class TestComposedObject(unittest.TestCase): - """ComposedObject unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_one_of_different_types.py deleted file mode 100644 index 6c003f5468f..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_one_of_different_types.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -from petstore_api import configuration - - -class TestComposedOneOfDifferentTypes(unittest.TestCase): - """ComposedOneOfDifferentTypes unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_composed_string.py b/samples/openapi3/client/petstore/python/test/test_models/test_composed_string.py deleted file mode 100644 index 943dceabba5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_composed_string.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.composed_string import ComposedString -from petstore_api import configuration - - -class TestComposedString(unittest.TestCase): - """ComposedString unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_currency.py b/samples/openapi3/client/petstore/python/test/test_models/test_currency.py deleted file mode 100644 index cb57f69cfd3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_currency.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.currency import Currency -from petstore_api import configuration - - -class TestCurrency(unittest.TestCase): - """Currency unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_danish_pig.py b/samples/openapi3/client/petstore/python/test/test_models/test_danish_pig.py deleted file mode 100644 index 600c5d2b42c..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_danish_pig.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.danish_pig import DanishPig -from petstore_api import configuration - - -class TestDanishPig(unittest.TestCase): - """DanishPig unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_date_time_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_date_time_test.py deleted file mode 100644 index 4dca8a44e0d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_date_time_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.date_time_test import DateTimeTest -from petstore_api import configuration - - -class TestDateTimeTest(unittest.TestCase): - """DateTimeTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python/test/test_models/test_date_time_with_validations.py deleted file mode 100644 index bb42a49ca27..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_date_time_with_validations.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.date_time_with_validations import DateTimeWithValidations -from petstore_api import configuration - - -class TestDateTimeWithValidations(unittest.TestCase): - """DateTimeWithValidations unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_date_with_validations.py b/samples/openapi3/client/petstore/python/test/test_models/test_date_with_validations.py deleted file mode 100644 index f69834dbe4e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_date_with_validations.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.date_with_validations import DateWithValidations -from petstore_api import configuration - - -class TestDateWithValidations(unittest.TestCase): - """DateWithValidations unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_decimal_payload.py b/samples/openapi3/client/petstore/python/test/test_models/test_decimal_payload.py deleted file mode 100644 index cbdc32d522a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_decimal_payload.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.decimal_payload import DecimalPayload -from petstore_api import configuration - - -class TestDecimalPayload(unittest.TestCase): - """DecimalPayload unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_dog.py b/samples/openapi3/client/petstore/python/test/test_models/test_dog.py deleted file mode 100644 index b98ff3d616a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_dog.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.dog import Dog -from petstore_api import configuration - - -class TestDog(unittest.TestCase): - """Dog unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_drawing.py b/samples/openapi3/client/petstore/python/test/test_models/test_drawing.py deleted file mode 100644 index ef7ebae2245..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_drawing.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.drawing import Drawing -from petstore_api import configuration - - -class TestDrawing(unittest.TestCase): - """Drawing unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_enum_arrays.py b/samples/openapi3/client/petstore/python/test/test_models/test_enum_arrays.py deleted file mode 100644 index 9677bdb09d7..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_enum_arrays.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.enum_arrays import EnumArrays -from petstore_api import configuration - - -class TestEnumArrays(unittest.TestCase): - """EnumArrays unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_enum_class.py b/samples/openapi3/client/petstore/python/test/test_models/test_enum_class.py deleted file mode 100644 index 186d2f9ea40..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_enum_class.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.enum_class import EnumClass -from petstore_api import configuration - - -class TestEnumClass(unittest.TestCase): - """EnumClass unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_enum_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_enum_test.py deleted file mode 100644 index 12b5a83ecc1..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_enum_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.enum_test import EnumTest -from petstore_api import configuration - - -class TestEnumTest(unittest.TestCase): - """EnumTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_equilateral_triangle.py b/samples/openapi3/client/petstore/python/test/test_models/test_equilateral_triangle.py deleted file mode 100644 index a730b002a18..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_equilateral_triangle.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api import configuration - - -class TestEquilateralTriangle(unittest.TestCase): - """EquilateralTriangle unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_file.py b/samples/openapi3/client/petstore/python/test/test_models/test_file.py deleted file mode 100644 index f16976abafe..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_file.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.file import File -from petstore_api import configuration - - -class TestFile(unittest.TestCase): - """File unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python/test/test_models/test_file_schema_test_class.py deleted file mode 100644 index 804b3929aaf..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_file_schema_test_class.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.file_schema_test_class import FileSchemaTestClass -from petstore_api import configuration - - -class TestFileSchemaTestClass(unittest.TestCase): - """FileSchemaTestClass unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_foo.py b/samples/openapi3/client/petstore/python/test/test_models/test_foo.py deleted file mode 100644 index b7f7f822e3a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_foo.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.foo import Foo -from petstore_api import configuration - - -class TestFoo(unittest.TestCase): - """Foo unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_format_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_format_test.py deleted file mode 100644 index 29260143794..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_format_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.format_test import FormatTest -from petstore_api import configuration - - -class TestFormatTest(unittest.TestCase): - """FormatTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py b/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py deleted file mode 100644 index 09cf54a1f6c..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_from_schema.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.from_schema import FromSchema -from petstore_api import configuration - - -class TestFromSchema(unittest.TestCase): - """FromSchema unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_fruit.py b/samples/openapi3/client/petstore/python/test/test_models/test_fruit.py deleted file mode 100644 index 18d6acdbbb0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_fruit.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.fruit import Fruit -from petstore_api import configuration - - -class TestFruit(unittest.TestCase): - """Fruit unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_fruit_req.py b/samples/openapi3/client/petstore/python/test/test_models/test_fruit_req.py deleted file mode 100644 index b3b595f5f28..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_fruit_req.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.fruit_req import FruitReq -from petstore_api import configuration - - -class TestFruitReq(unittest.TestCase): - """FruitReq unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_gm_fruit.py b/samples/openapi3/client/petstore/python/test/test_models/test_gm_fruit.py deleted file mode 100644 index af0199ec494..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_gm_fruit.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.gm_fruit import GmFruit -from petstore_api import configuration - - -class TestGmFruit(unittest.TestCase): - """GmFruit unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_grandparent_animal.py b/samples/openapi3/client/petstore/python/test/test_models/test_grandparent_animal.py deleted file mode 100644 index 748ebdd5b99..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_grandparent_animal.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.grandparent_animal import GrandparentAnimal -from petstore_api import configuration - - -class TestGrandparentAnimal(unittest.TestCase): - """GrandparentAnimal unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_has_only_read_only.py b/samples/openapi3/client/petstore/python/test/test_models/test_has_only_read_only.py deleted file mode 100644 index 84e2c36490a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_has_only_read_only.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.has_only_read_only import HasOnlyReadOnly -from petstore_api import configuration - - -class TestHasOnlyReadOnly(unittest.TestCase): - """HasOnlyReadOnly unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_health_check_result.py b/samples/openapi3/client/petstore/python/test/test_models/test_health_check_result.py deleted file mode 100644 index cfbd7180491..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_health_check_result.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.health_check_result import HealthCheckResult -from petstore_api import configuration - - -class TestHealthCheckResult(unittest.TestCase): - """HealthCheckResult unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum.py deleted file mode 100644 index 7cdaa27f8aa..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_enum import IntegerEnum -from petstore_api import configuration - - -class TestIntegerEnum(unittest.TestCase): - """IntegerEnum unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_big.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_big.py deleted file mode 100644 index 64f39bd58c6..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_big.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_enum_big import IntegerEnumBig -from petstore_api import configuration - - -class TestIntegerEnumBig(unittest.TestCase): - """IntegerEnumBig unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_one_value.py deleted file mode 100644 index 16052a6086d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_one_value.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue -from petstore_api import configuration - - -class TestIntegerEnumOneValue(unittest.TestCase): - """IntegerEnumOneValue unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_with_default_value.py deleted file mode 100644 index ffa57385fbe..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_enum_with_default_value.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_enum_with_default_value import IntegerEnumWithDefaultValue -from petstore_api import configuration - - -class TestIntegerEnumWithDefaultValue(unittest.TestCase): - """IntegerEnumWithDefaultValue unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_max10.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_max10.py deleted file mode 100644 index 46d8c0a7254..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_max10.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_max10 import IntegerMax10 -from petstore_api import configuration - - -class TestIntegerMax10(unittest.TestCase): - """IntegerMax10 unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_integer_min15.py b/samples/openapi3/client/petstore/python/test/test_models/test_integer_min15.py deleted file mode 100644 index 660bf12cd69..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_integer_min15.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.integer_min15 import IntegerMin15 -from petstore_api import configuration - - -class TestIntegerMin15(unittest.TestCase): - """IntegerMin15 unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_isosceles_triangle.py b/samples/openapi3/client/petstore/python/test/test_models/test_isosceles_triangle.py deleted file mode 100644 index 4d82f1056ab..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_isosceles_triangle.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api import configuration - - -class TestIsoscelesTriangle(unittest.TestCase): - """IsoscelesTriangle unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request.py b/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request.py deleted file mode 100644 index 87ab0b27615..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.json_patch_request import JSONPatchRequest -from petstore_api import configuration - - -class TestJSONPatchRequest(unittest.TestCase): - """JSONPatchRequest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_add_replace_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_add_replace_test.py deleted file mode 100644 index bcabf025afe..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_add_replace_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.json_patch_request_add_replace_test import JSONPatchRequestAddReplaceTest -from petstore_api import configuration - - -class TestJSONPatchRequestAddReplaceTest(unittest.TestCase): - """JSONPatchRequestAddReplaceTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_move_copy.py b/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_move_copy.py deleted file mode 100644 index 388b38f27a5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_move_copy.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.json_patch_request_move_copy import JSONPatchRequestMoveCopy -from petstore_api import configuration - - -class TestJSONPatchRequestMoveCopy(unittest.TestCase): - """JSONPatchRequestMoveCopy unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_remove.py b/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_remove.py deleted file mode 100644 index fe2001a85cb..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_json_patch_request_remove.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.json_patch_request_remove import JSONPatchRequestRemove -from petstore_api import configuration - - -class TestJSONPatchRequestRemove(unittest.TestCase): - """JSONPatchRequestRemove unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_mammal.py b/samples/openapi3/client/petstore/python/test/test_models/test_mammal.py deleted file mode 100644 index 402d785f461..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_mammal.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.mammal import Mammal -from petstore_api import configuration - - -class TestMammal(unittest.TestCase): - """Mammal unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_map_test.py b/samples/openapi3/client/petstore/python/test/test_models/test_map_test.py deleted file mode 100644 index c07747e22a0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_map_test.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.map_test import MapTest -from petstore_api import configuration - - -class TestMapTest(unittest.TestCase): - """MapTest unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/test/test_models/test_mixed_properties_and_additional_properties_class.py deleted file mode 100644 index aa8f05809ea..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_mixed_properties_and_additional_properties_class.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass -from petstore_api import configuration - - -class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase): - """MixedPropertiesAndAdditionalPropertiesClass unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_model200_response.py b/samples/openapi3/client/petstore/python/test/test_models/test_model200_response.py deleted file mode 100644 index 175bce11574..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_model200_response.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.model200_response import Model200Response -from petstore_api import configuration - - -class TestModel200Response(unittest.TestCase): - """Model200Response unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_model_return.py b/samples/openapi3/client/petstore/python/test/test_models/test_model_return.py deleted file mode 100644 index 97cc726a7a4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_model_return.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.model_return import ModelReturn -from petstore_api import configuration - - -class TestModelReturn(unittest.TestCase): - """ModelReturn unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_money.py b/samples/openapi3/client/petstore/python/test/test_models/test_money.py deleted file mode 100644 index 51977ceb525..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_money.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.money import Money -from petstore_api import configuration - - -class TestMoney(unittest.TestCase): - """Money unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_name.py b/samples/openapi3/client/petstore/python/test/test_models/test_name.py deleted file mode 100644 index 67aa3937383..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_name.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.name import Name -from petstore_api import configuration - - -class TestName(unittest.TestCase): - """Name unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_no_additional_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_no_additional_properties.py deleted file mode 100644 index 560d41b85b6..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_no_additional_properties.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.no_additional_properties import NoAdditionalProperties -from petstore_api import configuration - - -class TestNoAdditionalProperties(unittest.TestCase): - """NoAdditionalProperties unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_class.py b/samples/openapi3/client/petstore/python/test/test_models/test_nullable_class.py deleted file mode 100644 index 48e6a9dfca4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_class.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.nullable_class import NullableClass -from petstore_api import configuration - - -class TestNullableClass(unittest.TestCase): - """NullableClass unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_shape.py b/samples/openapi3/client/petstore/python/test/test_models/test_nullable_shape.py deleted file mode 100644 index 5fbf48eb049..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_shape.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.nullable_shape import NullableShape -from petstore_api import configuration - - -class TestNullableShape(unittest.TestCase): - """NullableShape unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_string.py b/samples/openapi3/client/petstore/python/test/test_models/test_nullable_string.py deleted file mode 100644 index e25a516b7c3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_nullable_string.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.nullable_string import NullableString -from petstore_api import configuration - - -class TestNullableString(unittest.TestCase): - """NullableString unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_number.py b/samples/openapi3/client/petstore/python/test/test_models/test_number.py deleted file mode 100644 index 3a82e0c8ac4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_number.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.number import Number -from petstore_api import configuration - - -class TestNumber(unittest.TestCase): - """Number unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_number_only.py b/samples/openapi3/client/petstore/python/test/test_models/test_number_only.py deleted file mode 100644 index 58b824ecd87..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_number_only.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.number_only import NumberOnly -from petstore_api import configuration - - -class TestNumberOnly(unittest.TestCase): - """NumberOnly unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_number_with_validations.py b/samples/openapi3/client/petstore/python/test/test_models/test_number_with_validations.py deleted file mode 100644 index a4074910185..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_number_with_validations.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.number_with_validations import NumberWithValidations -from petstore_api import configuration - - -class TestNumberWithValidations(unittest.TestCase): - """NumberWithValidations unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_interface.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_interface.py deleted file mode 100644 index 3745bece9d0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_interface.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_interface import ObjectInterface -from petstore_api import configuration - - -class TestObjectInterface(unittest.TestCase): - """ObjectInterface unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py deleted file mode 100644 index 75de5dd9654..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_arg_and_args_properties.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties -from petstore_api import configuration - - -class TestObjectModelWithArgAndArgsProperties(unittest.TestCase): - """ObjectModelWithArgAndArgsProperties unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_ref_props.py deleted file mode 100644 index 76145b49d05..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_model_with_ref_props.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -from petstore_api import configuration - - -class TestObjectModelWithRefProps(unittest.TestCase): - """ObjectModelWithRefProps unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py deleted file mode 100644 index 7f9078b4d72..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp -from petstore_api import configuration - - -class TestObjectWithAllOfWithReqTestPropFromUnsetAddProp(unittest.TestCase): - """ObjectWithAllOfWithReqTestPropFromUnsetAddProp unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_decimal_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_decimal_properties.py deleted file mode 100644 index 061eee9471d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_decimal_properties.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties -from petstore_api import configuration - - -class TestObjectWithDecimalProperties(unittest.TestCase): - """ObjectWithDecimalProperties unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_difficultly_named_props.py deleted file mode 100644 index 531aa29e499..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_difficultly_named_props.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps -from petstore_api import configuration - - -class TestObjectWithDifficultlyNamedProps(unittest.TestCase): - """ObjectWithDifficultlyNamedProps unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_inline_composition_property.py deleted file mode 100644 index 4d2ebb2ae4d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_inline_composition_property.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_inline_composition_property import ObjectWithInlineCompositionProperty -from petstore_api import configuration - - -class TestObjectWithInlineCompositionProperty(unittest.TestCase): - """ObjectWithInlineCompositionProperty unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py deleted file mode 100644 index b4bae2d5e6b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_invalid_named_refed_properties.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties -from petstore_api import configuration - - -class TestObjectWithInvalidNamedRefedProperties(unittest.TestCase): - """ObjectWithInvalidNamedRefedProperties unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_optional_test_prop.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_optional_test_prop.py deleted file mode 100644 index fbd21e71b9f..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_optional_test_prop.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_optional_test_prop import ObjectWithOptionalTestProp -from petstore_api import configuration - - -class TestObjectWithOptionalTestProp(unittest.TestCase): - """ObjectWithOptionalTestProp unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_validations.py b/samples/openapi3/client/petstore/python/test/test_models/test_object_with_validations.py deleted file mode 100644 index 61aa651da9a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_object_with_validations.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_validations import ObjectWithValidations -from petstore_api import configuration - - -class TestObjectWithValidations(unittest.TestCase): - """ObjectWithValidations unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_order.py b/samples/openapi3/client/petstore/python/test/test_models/test_order.py deleted file mode 100644 index a46866bc958..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_order.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.order import Order -from petstore_api import configuration - - -class TestOrder(unittest.TestCase): - """Order unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_parent_pet.py b/samples/openapi3/client/petstore/python/test/test_models/test_parent_pet.py deleted file mode 100644 index 1a738ebadcb..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_parent_pet.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.parent_pet import ParentPet -from petstore_api import configuration - - -class TestParentPet(unittest.TestCase): - """ParentPet unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_pet.py b/samples/openapi3/client/petstore/python/test/test_models/test_pet.py deleted file mode 100644 index bfe07aec750..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_pet.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.pet import Pet -from petstore_api import configuration - - -class TestPet(unittest.TestCase): - """Pet unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_pig.py b/samples/openapi3/client/petstore/python/test/test_models/test_pig.py deleted file mode 100644 index 17e9f30ed28..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_pig.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.pig import Pig -from petstore_api import configuration - - -class TestPig(unittest.TestCase): - """Pig unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_player.py b/samples/openapi3/client/petstore/python/test/test_models/test_player.py deleted file mode 100644 index 3a8ce50907e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_player.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.player import Player -from petstore_api import configuration - - -class TestPlayer(unittest.TestCase): - """Player unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral.py b/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral.py deleted file mode 100644 index 14db504bcf8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.quadrilateral import Quadrilateral -from petstore_api import configuration - - -class TestQuadrilateral(unittest.TestCase): - """Quadrilateral unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral_interface.py b/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral_interface.py deleted file mode 100644 index bd903fc4f3a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_quadrilateral_interface.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.quadrilateral_interface import QuadrilateralInterface -from petstore_api import configuration - - -class TestQuadrilateralInterface(unittest.TestCase): - """QuadrilateralInterface unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_read_only_first.py b/samples/openapi3/client/petstore/python/test/test_models/test_read_only_first.py deleted file mode 100644 index 12a8689951e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_read_only_first.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.read_only_first import ReadOnlyFirst -from petstore_api import configuration - - -class TestReadOnlyFirst(unittest.TestCase): - """ReadOnlyFirst unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_scalene_triangle.py b/samples/openapi3/client/petstore/python/test/test_models/test_scalene_triangle.py deleted file mode 100644 index 3d0ba995a6b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_scalene_triangle.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.scalene_triangle import ScaleneTriangle -from petstore_api import configuration - - -class TestScaleneTriangle(unittest.TestCase): - """ScaleneTriangle unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_shape.py b/samples/openapi3/client/petstore/python/test/test_models/test_shape.py deleted file mode 100644 index 644bae29d8d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_shape.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.shape import Shape -from petstore_api import configuration - - -class TestShape(unittest.TestCase): - """Shape unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_shape_or_null.py b/samples/openapi3/client/petstore/python/test/test_models/test_shape_or_null.py deleted file mode 100644 index 1c91dc2c7c6..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_shape_or_null.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.shape_or_null import ShapeOrNull -from petstore_api import configuration - - -class TestShapeOrNull(unittest.TestCase): - """ShapeOrNull unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_simple_quadrilateral.py b/samples/openapi3/client/petstore/python/test/test_models/test_simple_quadrilateral.py deleted file mode 100644 index d548e8549c6..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_simple_quadrilateral.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.simple_quadrilateral import SimpleQuadrilateral -from petstore_api import configuration - - -class TestSimpleQuadrilateral(unittest.TestCase): - """SimpleQuadrilateral unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_some_object.py b/samples/openapi3/client/petstore/python/test/test_models/test_some_object.py deleted file mode 100644 index 8e5c966c580..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_some_object.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.some_object import SomeObject -from petstore_api import configuration - - -class TestSomeObject(unittest.TestCase): - """SomeObject unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_special_model_name.py b/samples/openapi3/client/petstore/python/test/test_models/test_special_model_name.py deleted file mode 100644 index d6f945d0691..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_special_model_name.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.special_model_name import SpecialModelName -from petstore_api import configuration - - -class TestSpecialModelName(unittest.TestCase): - """SpecialModelName unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_string.py b/samples/openapi3/client/petstore/python/test/test_models/test_string.py deleted file mode 100644 index b868db50009..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_string.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.string import String -from petstore_api import configuration - - -class TestString(unittest.TestCase): - """String unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_string_boolean_map.py b/samples/openapi3/client/petstore/python/test/test_models/test_string_boolean_map.py deleted file mode 100644 index c24f051d9e5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_string_boolean_map.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.string_boolean_map import StringBooleanMap -from petstore_api import configuration - - -class TestStringBooleanMap(unittest.TestCase): - """StringBooleanMap unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_string_enum.py b/samples/openapi3/client/petstore/python/test/test_models/test_string_enum.py deleted file mode 100644 index eb44771116d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_string_enum.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.string_enum import StringEnum -from petstore_api import configuration - - -class TestStringEnum(unittest.TestCase): - """StringEnum unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/test/test_models/test_string_enum_with_default_value.py deleted file mode 100644 index c7d690c6ad5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_string_enum_with_default_value.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.string_enum_with_default_value import StringEnumWithDefaultValue -from petstore_api import configuration - - -class TestStringEnumWithDefaultValue(unittest.TestCase): - """StringEnumWithDefaultValue unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_string_with_validation.py b/samples/openapi3/client/petstore/python/test/test_models/test_string_with_validation.py deleted file mode 100644 index 3f08996edfa..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_string_with_validation.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.string_with_validation import StringWithValidation -from petstore_api import configuration - - -class TestStringWithValidation(unittest.TestCase): - """StringWithValidation unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_tag.py b/samples/openapi3/client/petstore/python/test/test_models/test_tag.py deleted file mode 100644 index 037216a10fe..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_tag.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.tag import Tag -from petstore_api import configuration - - -class TestTag(unittest.TestCase): - """Tag unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_triangle.py b/samples/openapi3/client/petstore/python/test/test_models/test_triangle.py deleted file mode 100644 index 853f1e14168..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_triangle.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.triangle import Triangle -from petstore_api import configuration - - -class TestTriangle(unittest.TestCase): - """Triangle unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_triangle_interface.py b/samples/openapi3/client/petstore/python/test/test_models/test_triangle_interface.py deleted file mode 100644 index 75fddda7d96..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_triangle_interface.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.triangle_interface import TriangleInterface -from petstore_api import configuration - - -class TestTriangleInterface(unittest.TestCase): - """TriangleInterface unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_user.py b/samples/openapi3/client/petstore/python/test/test_models/test_user.py deleted file mode 100644 index fcc8d79b3e4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_user.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.user import User -from petstore_api import configuration - - -class TestUser(unittest.TestCase): - """User unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_uuid_string.py b/samples/openapi3/client/petstore/python/test/test_models/test_uuid_string.py deleted file mode 100644 index 27a64c0c440..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_uuid_string.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.uuid_string import UUIDString -from petstore_api import configuration - - -class TestUUIDString(unittest.TestCase): - """UUIDString unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_whale.py b/samples/openapi3/client/petstore/python/test/test_models/test_whale.py deleted file mode 100644 index b3316eb84a1..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_whale.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.whale import Whale -from petstore_api import configuration - - -class TestWhale(unittest.TestCase): - """Whale unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_models/test_zebra.py b/samples/openapi3/client/petstore/python/test/test_models/test_zebra.py deleted file mode 100644 index a3ce520e9de..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_models/test_zebra.py +++ /dev/null @@ -1,25 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.zebra import Zebra -from petstore_api import configuration - - -class TestZebra(unittest.TestCase): - """Zebra unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/__init__.py deleted file mode 100644 index 1309632d3d5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -import json -import typing - -import urllib3 -from urllib3._collections import HTTPHeaderDict - - -class ApiTestMixin: - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = None, - accept_content_type: typing.Optional[str] = None, - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/test_patch.py b/samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/test_patch.py deleted file mode 100644 index 827d02aaf11..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_another_fake_dummy/test_patch.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.another_fake_dummy import patch # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestAnotherFakeDummy(ApiTestMixin, unittest.TestCase): - """ - AnotherFakeDummy unit test stubs - To test special tags # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py deleted file mode 100644 index c22a9853256..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake import delete # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFake(ApiTestMixin, unittest.TestCase): - """ - Fake unit test stubs - Fake endpoint to test group parameters (optional) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py deleted file mode 100644 index f5ec3b73469..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFake(ApiTestMixin, unittest.TestCase): - """ - Fake unit test stubs - To test enum parameters # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_patch.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_patch.py deleted file mode 100644 index e8d79727a09..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_patch.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake import patch # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFake(ApiTestMixin, unittest.TestCase): - """ - Fake unit test stubs - To test \"client\" model # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py deleted file mode 100644 index 714554981c6..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFake(ApiTestMixin, unittest.TestCase): - """ - Fake unit test stubs - Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/test_get.py deleted file mode 100644 index 7a2c11bd646..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_additional_properties_with_array_of_enums/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_additional_properties_with_array_of_enums import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeAdditionalPropertiesWithArrayOfEnums(ApiTestMixin, unittest.TestCase): - """ - FakeAdditionalPropertiesWithArrayOfEnums unit test stubs - Additional Properties with Array of Enums # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/test_put.py deleted file mode 100644 index 792ba93a1e8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_file_schema/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_body_with_file_schema import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeBodyWithFileSchema(ApiTestMixin, unittest.TestCase): - """ - FakeBodyWithFileSchema unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/test_put.py deleted file mode 100644 index 24385ae529e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_body_with_query_params/test_put.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_body_with_query_params import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeBodyWithQueryParams(ApiTestMixin, unittest.TestCase): - """ - FakeBodyWithQueryParams unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/test_put.py deleted file mode 100644 index 1f1cb364763..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_case_sensitive_params/test_put.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_case_sensitive_params import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeCaseSensitiveParams(ApiTestMixin, unittest.TestCase): - """ - FakeCaseSensitiveParams unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/test_patch.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/test_patch.py deleted file mode 100644 index 51c483bdc08..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_classname_test/test_patch.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_classname_test import patch # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeClassnameTest(ApiTestMixin, unittest.TestCase): - """ - FakeClassnameTest unit test stubs - To test class name in snake case # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/test_delete.py deleted file mode 100644 index a002c547aa5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_delete_coffee_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_delete_coffee_id import delete # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeDeleteCoffeeId(ApiTestMixin, unittest.TestCase): - """ - FakeDeleteCoffeeId unit test stubs - Delete coffee # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/test_get.py deleted file mode 100644 index dd6f2a54850..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_health/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_health import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeHealth(ApiTestMixin, unittest.TestCase): - """ - FakeHealth unit test stubs - Health check endpoint # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/test_post.py deleted file mode 100644 index a1b5801b829..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_additional_properties/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_inline_additional_properties import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeInlineAdditionalProperties(ApiTestMixin, unittest.TestCase): - """ - FakeInlineAdditionalProperties unit test stubs - test inline additionalProperties # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/test_post.py deleted file mode 100644 index fe16f7a4581..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_inline_composition_/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_inline_composition_ import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeInlineComposition(ApiTestMixin, unittest.TestCase): - """ - FakeInlineComposition unit test stubs - testing composed schemas at inline locations # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/test_get.py deleted file mode 100644 index 2c10640ca3f..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_form_data/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_json_form_data import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeJsonFormData(ApiTestMixin, unittest.TestCase): - """ - FakeJsonFormData unit test stubs - test json serialization of form data # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/test_patch.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/test_patch.py deleted file mode 100644 index add02d961a0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_patch/test_patch.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_json_patch import patch # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeJsonPatch(ApiTestMixin, unittest.TestCase): - """ - FakeJsonPatch unit test stubs - json patch # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = patch.ApiForpatch(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/test_post.py deleted file mode 100644 index 26105cad9f0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_json_with_charset/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_json_with_charset import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeJsonWithCharset(ApiTestMixin, unittest.TestCase): - """ - FakeJsonWithCharset unit test stubs - json with charset tx and rx # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/test_get.py deleted file mode 100644 index fc11f501a40..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_obj_in_query/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_obj_in_query import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeObjInQuery(ApiTestMixin, unittest.TestCase): - """ - FakeObjInQuery unit test stubs - user list # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/test_post.py deleted file mode 100644 index 8bf351c3dc3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_parameter_collisions_1_a_b_ab_self_a_b_/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_parameter_collisions_1_a_b_ab_self_a_b_ import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeParameterCollisions1ABAbSelfAB(ApiTestMixin, unittest.TestCase): - """ - FakeParameterCollisions1ABAbSelfAB unit test stubs - parameter collision case # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/test_post.py deleted file mode 100644 index 23bc55d273b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_pet_id_upload_image_with_required_file/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_pet_id_upload_image_with_required_file import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakePetIdUploadImageWithRequiredFile(ApiTestMixin, unittest.TestCase): - """ - FakePetIdUploadImageWithRequiredFile unit test stubs - uploads an image (required) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py deleted file mode 100644 index fe890aad78d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_query_param_with_json_content_type/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_query_param_with_json_content_type import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeQueryParamWithJsonContentType(ApiTestMixin, unittest.TestCase): - """ - FakeQueryParamWithJsonContentType unit test stubs - query param with json content-type # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/test_get.py deleted file mode 100644 index 61edf55e3d7..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_ref_obj_in_query/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_ref_obj_in_query import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefObjInQuery(ApiTestMixin, unittest.TestCase): - """ - FakeRefObjInQuery unit test stubs - user list # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/test_post.py deleted file mode 100644 index 28aedd8c2c0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_array_of_enums/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_array_of_enums import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsArrayOfEnums(ApiTestMixin, unittest.TestCase): - """ - FakeRefsArrayOfEnums unit test stubs - Array of Enums # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/test_post.py deleted file mode 100644 index a252701f4ee..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_arraymodel/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_arraymodel import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsArraymodel(ApiTestMixin, unittest.TestCase): - """ - FakeRefsArraymodel unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/test_post.py deleted file mode 100644 index 3ac8fd5b4ae..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_boolean/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_boolean import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsBoolean(ApiTestMixin, unittest.TestCase): - """ - FakeRefsBoolean unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/test_post.py deleted file mode 100644 index d5963d8503a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_composed_one_of_number_with_validations/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_composed_one_of_number_with_validations import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsComposedOneOfNumberWithValidations(ApiTestMixin, unittest.TestCase): - """ - FakeRefsComposedOneOfNumberWithValidations unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/test_post.py deleted file mode 100644 index fde250a49eb..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_enum/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_enum import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsEnum(ApiTestMixin, unittest.TestCase): - """ - FakeRefsEnum unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/test_post.py deleted file mode 100644 index a692191f471..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_mammal/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_mammal import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsMammal(ApiTestMixin, unittest.TestCase): - """ - FakeRefsMammal unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/test_post.py deleted file mode 100644 index b398b419ba9..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_number/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_number import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsNumber(ApiTestMixin, unittest.TestCase): - """ - FakeRefsNumber unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/test_post.py deleted file mode 100644 index f6c51016d9e..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_object_model_with_ref_props/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_object_model_with_ref_props import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsObjectModelWithRefProps(ApiTestMixin, unittest.TestCase): - """ - FakeRefsObjectModelWithRefProps unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/test_post.py deleted file mode 100644 index b7eaa838420..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_refs_string/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_refs_string import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeRefsString(ApiTestMixin, unittest.TestCase): - """ - FakeRefsString unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/test_get.py deleted file mode 100644 index bcab7c96465..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_response_without_schema/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_response_without_schema import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeResponseWithoutSchema(ApiTestMixin, unittest.TestCase): - """ - FakeResponseWithoutSchema unit test stubs - receives a response without schema # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py deleted file mode 100644 index b7bae3ad83a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_test_query_parameters/test_put.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_test_query_parameters import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeTestQueryParameters(ApiTestMixin, unittest.TestCase): - """ - FakeTestQueryParameters unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/test_post.py deleted file mode 100644 index 5c044094664..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_download_file/test_post.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_upload_download_file import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeUploadDownloadFile(ApiTestMixin, unittest.TestCase): - """ - FakeUploadDownloadFile unit test stubs - uploads a file and downloads a file using application/octet-stream # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/test_post.py deleted file mode 100644 index d877e592ac0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_file/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_upload_file import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeUploadFile(ApiTestMixin, unittest.TestCase): - """ - FakeUploadFile unit test stubs - uploads a file using multipart/form-data # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/test_post.py deleted file mode 100644 index b0123d36aea..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_fake_upload_files/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_upload_files import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFakeUploadFiles(ApiTestMixin, unittest.TestCase): - """ - FakeUploadFiles unit test stubs - uploads files using multipart/form-data # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_foo/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_foo/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_foo/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_foo/test_get.py deleted file mode 100644 index 809b636d6c3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_foo/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.foo import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestFoo(ApiTestMixin, unittest.TestCase): - """ - Foo unit test stubs - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 0 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_post.py deleted file mode 100644 index 5016a08a9c3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_post.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPet(ApiTestMixin, unittest.TestCase): - """ - Pet unit test stubs - Add a new pet to the store # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_put.py deleted file mode 100644 index 903536c66d0..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet/test_put.py +++ /dev/null @@ -1,44 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPet(ApiTestMixin, unittest.TestCase): - """ - Pet unit test stubs - Update an existing pet # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 400 - response_body = '' - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/test_get.py deleted file mode 100644 index 2251f64e1b5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_status/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_find_by_status import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetFindByStatus(ApiTestMixin, unittest.TestCase): - """ - PetFindByStatus unit test stubs - Finds Pets by status # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/test_get.py deleted file mode 100644 index 48671bad4f4..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_find_by_tags/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_find_by_tags import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetFindByTags(ApiTestMixin, unittest.TestCase): - """ - PetFindByTags unit test stubs - Finds Pets by tags # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_delete.py deleted file mode 100644 index 04b03559110..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_pet_id import delete # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetPetId(ApiTestMixin, unittest.TestCase): - """ - PetPetId unit test stubs - Deletes a pet # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 400 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_get.py deleted file mode 100644 index 78e02c339c2..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_pet_id import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetPetId(ApiTestMixin, unittest.TestCase): - """ - PetPetId unit test stubs - Find pet by ID # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_post.py deleted file mode 100644 index 6c6c9e60ad3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id/test_post.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_pet_id import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetPetId(ApiTestMixin, unittest.TestCase): - """ - PetPetId unit test stubs - Updates a pet in the store with form data # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 405 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/test_post.py deleted file mode 100644 index b25f4ef89b2..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_pet_pet_id_upload_image/test_post.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_pet_id_upload_image import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestPetPetIdUploadImage(ApiTestMixin, unittest.TestCase): - """ - PetPetIdUploadImage unit test stubs - uploads an image # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/test_get.py deleted file mode 100644 index e1363824ef8..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_store_inventory/test_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.store_inventory import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestStoreInventory(ApiTestMixin, unittest.TestCase): - """ - StoreInventory unit test stubs - Returns pet inventories by status # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_order/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_order/test_post.py deleted file mode 100644 index 69adb4340e5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order/test_post.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.store_order import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestStoreOrder(ApiTestMixin, unittest.TestCase): - """ - StoreOrder unit test stubs - Place an order for a pet # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_delete.py deleted file mode 100644 index 3b229d2b1b5..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.store_order_order_id import delete # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestStoreOrderOrderId(ApiTestMixin, unittest.TestCase): - """ - StoreOrderOrderId unit test stubs - Delete purchase order by ID # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 400 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_get.py deleted file mode 100644 index 55a5443d970..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_store_order_order_id/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.store_order_order_id import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestStoreOrderOrderId(ApiTestMixin, unittest.TestCase): - """ - StoreOrderOrderId unit test stubs - Find purchase order by ID # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user/test_post.py deleted file mode 100644 index 0b494f2ba22..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUser(ApiTestMixin, unittest.TestCase): - """ - User unit test stubs - Create user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 0 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/test_post.py deleted file mode 100644 index a6ed9b4d735..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_array/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_create_with_array import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserCreateWithArray(ApiTestMixin, unittest.TestCase): - """ - UserCreateWithArray unit test stubs - Creates list of users with given input array # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 0 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/test_post.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/test_post.py deleted file mode 100644 index 173e669239a..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_create_with_list/test_post.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_create_with_list import post # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserCreateWithList(ApiTestMixin, unittest.TestCase): - """ - UserCreateWithList unit test stubs - Creates list of users with given input array # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 0 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_login/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_login/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_login/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_login/test_get.py deleted file mode 100644 index ad71bc1d4f3..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_login/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_login import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserLogin(ApiTestMixin, unittest.TestCase): - """ - UserLogin unit test stubs - Logs user into the system # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/test_get.py deleted file mode 100644 index 9329c79fb23..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_logout/test_get.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_logout import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserLogout(ApiTestMixin, unittest.TestCase): - """ - UserLogout unit test stubs - Logs out current logged in user session # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 0 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/__init__.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py deleted file mode 100644 index 4ea2cc0f52b..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_username import delete # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserUsername(ApiTestMixin, unittest.TestCase): - """ - UserUsername unit test stubs - Delete user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = delete.ApiFordelete(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_get.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_get.py deleted file mode 100644 index c56b8bd1e4d..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_get.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_username import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserUsername(ApiTestMixin, unittest.TestCase): - """ - UserUsername unit test stubs - Get user by user name # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_put.py b/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_put.py deleted file mode 100644 index 6e94769a585..00000000000 --- a/samples/openapi3/client/petstore/python/test/test_paths/test_user_username/test_put.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.user_username import put # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestUserUsername(ApiTestMixin, unittest.TestCase): - """ - UserUsername unit test stubs - Updated user # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 400 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/test_python.sh b/samples/openapi3/client/petstore/python/test_python.sh deleted file mode 100755 index 9728a9b5316..00000000000 --- a/samples/openapi3/client/petstore/python/test_python.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -REQUIREMENTS_FILE=dev-requirements.txt -REQUIREMENTS_OUT=dev-requirements.txt.log -SETUP_OUT=*.egg-info -VENV=venv -DEACTIVE=false - -export LC_ALL=en_US.UTF-8 -export LANG=en_US.UTF-8 - -### set virtualenv -if [ -z "$VENVV" ]; then - python3 -m venv $VENV - source $VENV/bin/activate - DEACTIVE=true -fi - -### install dependencies -pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT -### locally install the package, needed for pycharm problem checking -pip install -e . - -### run tests -tox || exit 1 - -### static analysis of code -#flake8 --show-source petstore_api/ - -### deactivate virtualenv -#if [ $DEACTIVE == true ]; then -# deactivate -#fi diff --git a/samples/openapi3/client/petstore/python/testfiles/1px_pic1.png b/samples/openapi3/client/petstore/python/testfiles/1px_pic1.png deleted file mode 100644 index 7d3a386a21026f9b15b2c303a81f5c69333e9056..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmeAS@N?(olHy`uVBq!ia0vp^j3CSbBp9sfW`_bPE>9Q7kcv6UzxWv#Ss9tmFVH&+ OlJ#`;b6Mw<&;$T@!wsPT diff --git a/samples/openapi3/client/petstore/python/testfiles/1px_pic2.png b/samples/openapi3/client/petstore/python/testfiles/1px_pic2.png deleted file mode 100644 index 7d3a386a21026f9b15b2c303a81f5c69333e9056..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 67 zcmeAS@N?(olHy`uVBq!ia0vp^j3CSbBp9sfW`_bPE>9Q7kcv6UzxWv#Ss9tmFVH&+ OlJ#`;b6Mw<&;$T@!wsPT diff --git a/samples/openapi3/client/petstore/python/tests_manual/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/__init__.py deleted file mode 100644 index 2d3b295fb8c..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/__init__.py +++ /dev/null @@ -1,110 +0,0 @@ -import collections -import json -import typing -import unittest - -import urllib3 -from urllib3._collections import HTTPHeaderDict - -from petstore_api import api_client - -ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization explode', defaults=[False]) - - -class ApiTestMixin(unittest.TestCase): - json_content_type = 'application/json' - user_agent = 'OpenAPI-Generator/1.0.0/python' - - @classmethod - def assert_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = 'application/json', - fields: typing.Optional[typing.Tuple[api_client.RequestField, ...]] = None, - accept_content_type: typing.Optional[str] = 'application/json', - stream: bool = False, - ): - headers = { - 'User-Agent': cls.user_agent - } - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - fields=fields, - stream=stream, - timeout=None, - ) - if method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @classmethod - def assert_pool_manager_request_called_with( - cls, - mock_request, - url: str, - method: str = 'POST', - body: typing.Optional[bytes] = None, - content_type: typing.Optional[str] = 'application/json', - accept_content_type: typing.Optional[str] = 'application/json', - stream: bool = False, - headers: typing.Optional[typing.Dict] = None - ): - if headers is None: - headers = {} - headers['User-Agent'] = cls.user_agent - if accept_content_type: - headers['Accept'] = accept_content_type - if content_type: - headers['Content-Type'] = content_type - kwargs = dict( - headers=HTTPHeaderDict(headers), - preload_content=not stream, - timeout=None, - ) - if content_type and method != 'GET': - kwargs['body'] = body - mock_request.assert_called_with( - method, - url, - **kwargs - ) - - @staticmethod - def headers_for_content_type(content_type: str) -> typing.Dict[str, str]: - return {'content-type': content_type} - - @classmethod - def response( - cls, - body: typing.Union[str, bytes], - status: int = 200, - content_type: str = json_content_type, - headers: typing.Optional[typing.Dict[str, str]] = None, - preload_content: bool = True, - reason: typing.Optional[str] = None - ) -> urllib3.HTTPResponse: - if headers is None: - headers = {} - headers.update(cls.headers_for_content_type(content_type)) - return urllib3.HTTPResponse( - body, - headers=headers, - status=status, - preload_content=preload_content, - reason=reason - ) - - @staticmethod - def json_bytes(in_data: typing.Any) -> bytes: - return json.dumps(in_data, separators=(",", ":"), ensure_ascii=False).encode('utf-8') diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py deleted file mode 100644 index 589beb05cde..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_class.py +++ /dev/null @@ -1,35 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -from petstore_api.model.additional_properties_class import AdditionalPropertiesClass -from petstore_api import schemas - - -class TestAdditionalPropertiesClass(unittest.TestCase): - """AdditionalPropertiesClass unit test stubs""" - - def test_additional_properties_class(self): - inst = AdditionalPropertiesClass({}) - with self.assertRaises(KeyError): - inst["map_property"] - assert inst.get_item_oapg("map_property") is schemas.unset - with self.assertRaises(AttributeError): - inst.map_property - - inst = AdditionalPropertiesClass(map_property={}) - map_property = inst["map_property"] - assert map_property == {} - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py b/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py deleted file mode 100644 index a54404c542a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_additional_properties_validator.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -from petstore_api.model.additional_properties_validator import AdditionalPropertiesValidator -from petstore_api import schemas, exceptions - - -class TestAdditionalPropertiesValidator(unittest.TestCase): - """AdditionalPropertiesValidator unit test stubs""" - - def test_additional_properties_validator(self): - with self.assertRaises(exceptions.ApiValueError): - AdditionalPropertiesValidator(tooShort='ab') - - with self.assertRaises(exceptions.ApiValueError): - AdditionalPropertiesValidator(tooLong='abcdef') - - inst = AdditionalPropertiesValidator(addProp='abc') - add_prop = inst['addProp'] - assert add_prop == 'abc' - assert isinstance(add_prop, str) - assert isinstance(add_prop, schemas.AnyTypeSchema) - assert isinstance(add_prop, AdditionalPropertiesValidator.MetaOapg.all_of()[1].MetaOapg.additional_properties) - assert isinstance(add_prop, AdditionalPropertiesValidator.MetaOapg.all_of()[2].MetaOapg.additional_properties) - assert not isinstance(add_prop, schemas.UnsetAnyTypeSchema) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_animal.py b/samples/openapi3/client/petstore/python/tests_manual/test_animal.py deleted file mode 100644 index 68bb19bd249..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_animal.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import frozendict - -import petstore_api -from petstore_api.model.cat import Cat -from petstore_api.model.dog import Dog -from petstore_api.model.animal import Animal -from petstore_api.schemas import StrSchema, BoolSchema - - -class TestAnimal(unittest.TestCase): - """Animal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testAnimal(self): - """Test Animal""" - - regex_err = ( - r"Invalid discriminator value was passed in to Animal.className " - r"Only the values \['Cat', 'Dog'\] are allowed at \('args\[0\]', 'className'\)" - ) - with self.assertRaisesRegex(petstore_api.ApiValueError, regex_err): - Animal(className='Fox', color='red') - - animal = Animal(className='Cat', color='black') - assert isinstance(animal, frozendict.frozendict) - assert isinstance(animal, Cat) - assert isinstance(animal, Cat.MetaOapg.all_of()[1]) - assert isinstance(animal, Animal) - assert set(animal.keys()) == {'className', 'color'} - assert animal.className == 'Cat' - assert animal["color"] == 'black' - assert isinstance(animal["color"], StrSchema) - assert isinstance(animal.className, StrSchema) - - # pass in optional param - animal = Animal(className='Cat', color='black', declawed=True) - assert isinstance(animal, Animal) - assert isinstance(animal, frozendict.frozendict) - assert isinstance(animal, Cat) - assert isinstance(animal, Cat.MetaOapg.all_of()[1]) - assert set(animal.keys()) == {'className', 'color', 'declawed'} - assert animal.className == 'Cat' - assert animal["color"] == 'black' - assert bool(animal["declawed"]) is True - assert isinstance(animal["color"], StrSchema) - assert isinstance(animal.className, StrSchema) - assert isinstance(animal["declawed"], BoolSchema) - - # make a Dog - animal = Animal(className='Dog', color='black') - assert isinstance(animal, Animal) - assert isinstance(animal, frozendict.frozendict) - assert isinstance(animal, Dog) - assert isinstance(animal, Dog.MetaOapg.all_of()[1]) - assert set(animal.keys()) == {'className', 'color'} - assert animal.className == 'Dog' - assert animal["color"] == 'black' - assert isinstance(animal["color"], StrSchema) - assert isinstance(animal.className, StrSchema) - - # pass in optional param - animal = Animal(className='Dog', color='black', breed='Labrador') - assert isinstance(animal, Animal) - assert isinstance(animal, frozendict.frozendict) - assert isinstance(animal, Dog) - assert isinstance(animal, Dog.MetaOapg.all_of()[1]) - assert set(animal.keys()) == {'className', 'color', 'breed'} - assert animal.className == 'Dog' - assert animal["color"] == 'black' - assert animal["breed"] == 'Labrador' - assert isinstance(animal.className, StrSchema) - assert isinstance(animal["color"], StrSchema) - assert isinstance(animal["breed"], StrSchema) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py deleted file mode 100644 index 3882982711a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_and_format.py +++ /dev/null @@ -1,237 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import datetime -import decimal -import unittest -import uuid - -from petstore_api.model.any_type_and_format import AnyTypeAndFormat -from petstore_api import exceptions - - -class TestAnyTypeAndFormat(unittest.TestCase): - """AnyTypeAndFormat unit test stubs""" - - def test_uuid(self): - valid_uuid_str = '12345678-1234-5678-1234-567812345678' - valid_values = [ - valid_uuid_str, - {}, - uuid.UUID(valid_uuid_str), - 1, - 3.14, - decimal.Decimal('3.14'), - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(uuid=valid_value) - - # an invalid value does not work - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(uuid='1') - - def test_date(self): - valid_values = [ - '2022-01-02', - {}, - datetime.date(2022, 1, 2), - 1, - 3.14, - decimal.Decimal('3.14'), - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(date=valid_value) - - # an invalid value does not work - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(date='1') - - def test_date_time(self): - valid_values = [ - "2020-01-01T00:00:00", - {}, - datetime.datetime(2020, 1, 1), - 1, - 3.14, - decimal.Decimal('3.14'), - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat({'date-time': valid_value}) - - # an invalid value does not work - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat({'date-time': 'abcd'}) - - def test_number(self): - valid_values = [ - '3.14', - {}, - 1, - 3.14, - decimal.Decimal('3.14'), - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(number=valid_value) - - # an invalid value does not work - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(number='a') - - def test_int32(self): - min_bound = decimal.Decimal(-2147483648) - max_bound = decimal.Decimal(2147483647) - under_min_number = min_bound - decimal.Decimal('0.1') - over_max_number = max_bound + decimal.Decimal('0.1') - valid_values = [ - 'a', - {}, - 1, - 3.14, - min_bound, - max_bound, - under_min_number, - over_max_number, - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(int32=valid_value) - - # invalid values do not work - invalid_values = ( - min_bound - 1, - max_bound + 1 - ) - for invalid_value in invalid_values: - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(int32=invalid_value) - - def test_int64(self): - min_bound = decimal.Decimal(-9223372036854775808) - max_bound = decimal.Decimal(9223372036854775807) - under_min_number = min_bound - decimal.Decimal('0.1') - over_max_number = max_bound + decimal.Decimal('0.1') - valid_values = [ - 'a', - {}, - 1, - 3.14, - min_bound, - max_bound, - under_min_number, - over_max_number, - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(int64=valid_value) - - # invalid values do not work - invalid_values = ( - min_bound - 1, - max_bound + 1 - ) - for invalid_value in invalid_values: - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(int64=invalid_value) - - def test_float(self): - min_bound = decimal.Decimal(-3.4028234663852886e+38) - max_bound = decimal.Decimal(3.4028234663852886e+38) - valid_values = [ - 'a', - {}, - 1, - 3.14, - min_bound, - max_bound, - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(double=valid_value) - - # invalid values do not work - invalid_values = ( - min_bound - decimal.Decimal('0.1'), - max_bound + decimal.Decimal('0.1'), - min_bound - 1, - max_bound + 1 - ) - for invalid_value in invalid_values: - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(float=invalid_value) - - def test_double(self): - min_bound = decimal.Decimal(-1.7976931348623157E+308) - max_bound = decimal.Decimal(1.7976931348623157E+308) - valid_values = [ - 'a', - {}, - 1, - 3.14, - min_bound, - max_bound, - True, - None, - [], - (), - b'abc' - ] - for valid_value in valid_values: - AnyTypeAndFormat(double=valid_value) - - with decimal.localcontext() as ctx: - ctx.prec = 310 - # local higher precision context needed to correctly create these numbers - invalid_values = ( - min_bound - decimal.Decimal('0.1'), - max_bound + decimal.Decimal('0.1'), - min_bound - 1, - max_bound + 1 - ) - # invalid values do not work - for invalid_value in invalid_values: - with self.assertRaises(exceptions.ApiValueError): - AnyTypeAndFormat(double=invalid_value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_not_string.py b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_not_string.py deleted file mode 100644 index 88e16175e11..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_not_string.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.any_type_not_string import AnyTypeNotString - - -class TestAnyTypeNotString(unittest.TestCase): - """AnyTypeNotString unit test stubs""" - - def test_AnyTypeNotString(self): - # valid values work - valid_values = [ - True, - None, - 0, - 3.14, - [], - {} - ] - for valid_value in valid_values: - AnyTypeNotString(valid_value) - - # invalid value raises an exception - with self.assertRaises(petstore_api.ApiValueError): - AnyTypeNotString('') - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py deleted file mode 100644 index 15f498bcc0a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_any_type_schema.py +++ /dev/null @@ -1,230 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest -from decimal import Decimal - -import frozendict - -import petstore_api -from petstore_api.schemas import ( - AnyTypeSchema, - DictSchema, - ListSchema, - StrSchema, - NumberSchema, - IntSchema, - BoolSchema, - NoneSchema, - DateSchema, - DateTimeSchema, - DecimalSchema, - ComposedSchema, - NoneClass, - BoolClass -) - - -class TestAnyTypeSchema(unittest.TestCase): - - def testDictSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - DictSchema, - ] - - m = Model(a=1, b='hi') - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, DictSchema) - assert isinstance(m, frozendict.frozendict) - assert m == frozendict.frozendict(a=Decimal(1), b='hi') - - def testListSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - ListSchema, - ] - - m = Model([1, 'hi']) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, ListSchema) - assert isinstance(m, tuple) - assert m == tuple([Decimal(1), 'hi']) - - def testStrSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - StrSchema, - ] - - m = Model('hi') - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, StrSchema) - assert isinstance(m, str) - assert m == 'hi' - - def testNumberSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - NumberSchema, - ] - - m = Model(1) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, NumberSchema) - assert isinstance(m, Decimal) - assert m == Decimal(1) - - m = Model(3.14) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, NumberSchema) - assert isinstance(m, Decimal) - assert m == Decimal(3.14) - - def testIntSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - IntSchema, - ] - - m = Model(1) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, IntSchema) - assert isinstance(m, Decimal) - assert m == Decimal(1) - - with self.assertRaises(petstore_api.exceptions.ApiValueError): - # can't pass in float into Int - Model(3.14) - - def testBoolSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - BoolSchema, - ] - - m = Model(True) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, BoolSchema) - assert isinstance(m, BoolClass) - self.assertTrue(m) - - m = Model(False) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, BoolSchema) - assert isinstance(m, BoolClass) - self.assertFalse(m) - - def testNoneSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - NoneSchema, - ] - - m = Model(None) - self.assertTrue(m.is_none_oapg()) - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, NoneSchema) - assert isinstance(m, NoneClass) - - def testDateSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - DateSchema, - ] - - m = Model('1970-01-01') - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, DateSchema) - assert isinstance(m, str) - assert m == '1970-01-01' - - def testDateTimeSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - DateTimeSchema, - ] - - m = Model('2020-01-01T00:00:00') - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, DateTimeSchema) - assert isinstance(m, str) - assert m == '2020-01-01T00:00:00' - - def testDecimalSchema(self): - class Model(ComposedSchema): - class MetaOapg: - @staticmethod - def all_of(): - return [ - AnyTypeSchema, - DecimalSchema, - ] - - m = Model('12.34') - assert m == '12.34' - assert m.as_decimal_oapg == Decimal('12.34') - assert isinstance(m, Model) - assert isinstance(m, AnyTypeSchema) - assert isinstance(m, DecimalSchema) - assert isinstance(m, str) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python/tests_manual/test_array_holding_any_type.py deleted file mode 100644 index 6addb31d8fc..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_array_holding_any_type.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest -from datetime import date, datetime, timezone - -import petstore_api -from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType -from petstore_api.schemas import NoneClass, BoolClass - - -class TestArrayHoldingAnyType(unittest.TestCase): - """ArrayHoldingAnyType unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testArrayHoldingAnyType(self): - """Test ArrayHoldingAnyType""" - - enum_values = [True, False] - for enum_value in enum_values: - inst = ArrayHoldingAnyType([enum_value]) - assert isinstance(inst, ArrayHoldingAnyType) - assert isinstance(inst, tuple) - assert isinstance(inst[0], BoolClass) - assert bool(inst[0]) is enum_value - - inst = ArrayHoldingAnyType([None]) - assert isinstance(inst, ArrayHoldingAnyType) - assert isinstance(inst, tuple) - assert isinstance(inst[0], NoneClass) - - input_to_stored_value = [ - (0, 0), - (3.14, 3.14), - (date(1970, 1, 1), '1970-01-01'), - (datetime(1970, 1, 1, 0, 0, 0), '1970-01-01T00:00:00'), - (datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc), '1970-01-01T00:00:00+00:00'), - ([], ()), - ({}, {}), - ('hi', 'hi'), - ] - for input, stored_value in input_to_stored_value: - inst = ArrayHoldingAnyType([input]) - assert isinstance(inst, ArrayHoldingAnyType) - assert isinstance(inst, tuple) - assert inst[0] == stored_value - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py deleted file mode 100644 index 1d3eccb68ed..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_array_with_validations_in_items.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems - - -class TestArrayWithValidationsInItems(unittest.TestCase): - """ArrayWithValidationsInItems unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testArrayWithValidationsInItems(self): - """Test ArrayWithValidationsInItems""" - - valid_values = [-1, 5, 7] - for valid_value in valid_values: - inst = ArrayWithValidationsInItems([valid_value]) - assert isinstance(inst, ArrayWithValidationsInItems) - assert inst == (valid_value,) - - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Invalid value `8`, must be a value less than or equal to `7` at \('args\[0\]', 0\)" - ): - ArrayWithValidationsInItems([8]) - - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Invalid value `\(Decimal\('1'\), Decimal\('2'\), Decimal\('3'\)\)`, number of items must be less than or equal to `2` at \('args\[0\]',\)" - ): - ArrayWithValidationsInItems([1, 2, 3]) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_boolean_enum.py b/samples/openapi3/client/petstore/python/tests_manual/test_boolean_enum.py deleted file mode 100644 index 530755c0681..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_boolean_enum.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.boolean_enum import BooleanEnum - - -class TestBooleanEnum(unittest.TestCase): - """BooleanEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_BooleanEnum(self): - """Test BooleanEnum""" - model = BooleanEnum(True) - assert model is BooleanEnum.TRUE - assert model.is_true_oapg() - assert model.is_false_oapg() is False - assert repr(model) == '' - with self.assertRaises(petstore_api.ApiValueError): - BooleanEnum(False) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_combine_object_schemas.py b/samples/openapi3/client/petstore/python/tests_manual/test_combine_object_schemas.py deleted file mode 100644 index cdbd7b1747c..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_combine_object_schemas.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.schemas import AnyTypeSchema, DictSchema, IntSchema, StrSchema, Float32Schema, DateSchema -from petstore_api.model.danish_pig import DanishPig -from petstore_api.model.basque_pig import BasquePig -from petstore_api.model.no_additional_properties import NoAdditionalProperties -from petstore_api.model.address import Address -from petstore_api.model.apple_req import AppleReq -from petstore_api.model.banana_req import BananaReq -from petstore_api.model.player import Player - -class TestCombineObjectSchemas(unittest.TestCase): - pass -# def test_invalid_combo_additional_properties_missing(self): -# regex_err = ( -# r"Cannot combine additionalProperties schemas from.+?DanishPig.+?and.+?NoAdditionalProperties.+?" -# r"in.+?Combo.+?because additionalProperties does not exist in both schemas" -# ) -# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): -# class Combo(DanishPig, NoAdditionalProperties): -# pass -# -# def test_invalid_combo_both_no_addprops(self): -# regex_err = ( -# r"Cannot combine schemas from.+?AppleReq.+?and.+?BananaReq.+?" -# r"in.+?Combo.+?because cultivar is missing from.+?BananaReq.+?" -# ) -# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): -# class Combo(AppleReq, BananaReq): -# pass -# -# def test_valid_no_addprops(self): -# class FirstSchema(DictSchema): -# -# -# class a(IntSchema): -# _validations = { -# 'inclusive_maximum': 20, -# } -# -# b = Float32Schema -# -# _additional_properties = None -# -# class SecondSchema(DictSchema): -# -# -# class a(IntSchema): -# _validations = { -# 'inclusive_minimum': 10, -# } -# -# b = Float32Schema -# -# _additional_properties = None -# -# class Combo(FirstSchema, SecondSchema): -# pass -# -# assert Combo._additional_properties is None -# self.assertEqual(Combo._property_names, ('a', 'b')) -# assert Combo.a._validations == { -# 'inclusive_maximum': 20, -# 'inclusive_minimum': 10, -# } -# assert Combo.b is Float32Schema -# -# -# def test_valid_combo_additional_properties_anytype_prim(self): -# class TwoPropsAndIntegerAddProp(DictSchema): -# a = StrSchema -# b = Float32Schema -# _additional_properties = IntSchema -# -# class OnePropAndAnyTypeAddProps(DictSchema): -# c = IntSchema -# _additional_properties = AnyTypeSchema -# -# class Combo(TwoPropsAndIntegerAddProp, OnePropAndAnyTypeAddProps): -# pass -# -# assert Combo._additional_properties is TwoPropsAndIntegerAddProp._additional_properties -# self.assertEqual(Combo._property_names, ('a', 'b', 'c')) -# assert Combo.a is TwoPropsAndIntegerAddProp.a -# assert Combo.b is TwoPropsAndIntegerAddProp.b -# assert Combo.c is OnePropAndAnyTypeAddProps.c -# -# def test_invalid_type_disagreement(self): -# class StrSchemaA(DictSchema): -# a = StrSchema -# _additional_properties = AnyTypeSchema -# -# class FloatSchemaA(DictSchema): -# a = Float32Schema -# _additional_properties = AnyTypeSchema -# -# regex_err = ( -# r"Cannot combine schemas.+?StrSchema.+?and.+?Float32Schema.+?" -# r"in.+?a.+?because their types do not intersect" -# ) -# with self.assertRaisesRegex(petstore_api.ApiTypeError, regex_err): -# class Combo(StrSchemaA, FloatSchemaA): -# pass -# -# def test_valid_combo_including_self_reference(self): -# -# class EnemyPlayerAndA(DictSchema): -# a = DateSchema -# -# class enemyPlayer(DictSchema): -# heightCm = IntSchema -# _additional_properties = AnyTypeSchema -# -# _additional_properties = AnyTypeSchema -# -# class Combo(Player, EnemyPlayerAndA): -# # we have a self reference where Player.enemyPlayer = Player -# pass -# -# """ -# For Combo -# name is from Player -# enemyPlayer is from Player + EnemyPlayerAndA -# a is from EnemyPlayerAndA -# """ -# self.assertEqual(Combo._property_names, ('a', 'enemyPlayer', 'name')) -# self.assertEqual(Combo.enemyPlayer.__bases__, (EnemyPlayerAndA.enemyPlayer, Player)) -# """ -# For Combo.enemyPlayer -# heightCm is from EnemyPlayerAndA.enemyPlayer -# name is from Player.enemyPlayer -# enemyPlayer is from Player.enemyPlayer -# """ -# self.assertEqual(Combo.enemyPlayer._property_names, ('enemyPlayer', 'heightCm', 'name')) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py b/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py deleted file mode 100644 index f77f71ec46a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_combine_schemas.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import decimal -import unittest - -import petstore_api -from petstore_api.model.date_with_validations import DateWithValidations -from petstore_api.model.date_time_with_validations import DateTimeWithValidations -from petstore_api.model.string_with_validation import StringWithValidation -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue -from petstore_api.model.integer_enum import IntegerEnum -from petstore_api.model.integer_enum_big import IntegerEnumBig -from petstore_api.model.integer_max10 import IntegerMax10 -from petstore_api.model.integer_min15 import IntegerMin15 -from petstore_api.model.nullable_string import NullableString -from petstore_api.schemas import AnyTypeSchema, Schema, NoneSchema, StrSchema, none_type, Singleton - - -class TestCombineNonObjectSchemas(unittest.TestCase): - - def test_valid_enum_plus_prim(self): - class EnumPlusPrim(IntegerMax10, IntegerEnumOneValue): - pass - - # order of base classes does not matter - class EnumPlusPrim(IntegerEnumOneValue, IntegerMax10): - pass - - enum_value = EnumPlusPrim.POSITIVE_0 - assert isinstance(enum_value, EnumPlusPrim) - assert isinstance(enum_value, Singleton) - assert isinstance(enum_value, decimal.Decimal) - # we can access this enum from our class - assert EnumPlusPrim.POSITIVE_0 == 0 - - # invalid value throws an exception - with self.assertRaises(petstore_api.ApiValueError): - EnumPlusPrim(9) - - # valid value succeeds - val = EnumPlusPrim(0) - assert val == 0 - assert isinstance(val, EnumPlusPrim) - assert isinstance(val, Singleton) - assert isinstance(val, decimal.Decimal) - - def test_valid_enum_plus_enum(self): - class IntegerOneEnum(IntegerEnumOneValue, IntegerEnum): - pass - - # order of base classes does not matter - class IntegerOneEnum(IntegerEnum, IntegerEnumOneValue): - pass - - enum_value = IntegerOneEnum.POSITIVE_0 - assert isinstance(enum_value, IntegerOneEnum) - assert isinstance(enum_value, Singleton) - assert isinstance(enum_value, decimal.Decimal) - # we can access this enum from our class - assert IntegerOneEnum.POSITIVE_0 == 0 - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_bool.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_bool.py deleted file mode 100644 index 45eb1491066..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_bool.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.composed_bool import ComposedBool - - -class TestComposedBool(unittest.TestCase): - """ComposedBool unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedBool(self): - """Test ComposedBool""" - all_values = [None, True, False, 2, 3.14, '', {}, []] - for value in all_values: - if isinstance(value, bool): - model = ComposedBool(value) - if value is True: - self.assertTrue(bool(model)) - self.assertTrue(model.is_true_oapg()) - self.assertFalse(model.is_false_oapg()) - else: - self.assertTrue(model.is_false_oapg()) - self.assertFalse(model.is_true_oapg()) - self.assertFalse(bool(model)) - continue - with self.assertRaises(petstore_api.ApiTypeError): - ComposedBool(value) - continue - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_none.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_none.py deleted file mode 100644 index a37eb26b104..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_none.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.composed_none import ComposedNone - - -class TestComposedNone(unittest.TestCase): - """ComposedNone unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedNone(self): - """Test ComposedNone""" - valid_values = [None] - all_values = [None, True, False, 2, 3.14, '', {}, []] - for value in all_values: - if value not in valid_values: - with self.assertRaises(petstore_api.ApiTypeError): - model = ComposedNone(value) - continue - model = ComposedNone(value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_number.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_number.py deleted file mode 100644 index 1cd982e3f33..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_number.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.composed_number import ComposedNumber - - -class TestComposedNumber(unittest.TestCase): - """ComposedNumber unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedNumber(self): - """Test ComposedNumber""" - valid_values = [2, 3.14] - all_values = [None, True, False, 2, 3.14, '', {}, []] - for value in all_values: - if value not in valid_values: - with self.assertRaises(petstore_api.ApiTypeError): - model = ComposedNumber(value) - continue - model = ComposedNumber(value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_object.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_object.py deleted file mode 100644 index 7c79c574d9b..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_object.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.composed_object import ComposedObject - - -class TestComposedObject(unittest.TestCase): - """ComposedObject unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedObject(self): - """Test ComposedObject""" - valid_values = [{}] - all_values = [None, True, False, 2, 3.14, '', {}, []] - for value in all_values: - if value not in valid_values: - with self.assertRaises(petstore_api.ApiTypeError): - model = ComposedObject(value) - continue - model = ComposedObject(value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py deleted file mode 100644 index e98af8bb8f9..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_one_of_different_types.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest -from datetime import date, datetime, timezone -from dateutil.tz import tzutc - -import frozendict - -from petstore_api.schemas import DateSchema, DateTimeSchema, Singleton, NoneClass -from petstore_api.model.animal import Animal -from petstore_api.model.cat import Cat -from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes -from petstore_api.model.number_with_validations import NumberWithValidations - -class TestComposedOneOfDifferentTypes(unittest.TestCase): - """ComposedOneOfDifferentTypes unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedOneOfDifferentTypes(self): - """Test ComposedOneOfDifferentTypes""" - # we can make an instance that stores float data - inst = ComposedOneOfDifferentTypes(10.0) - assert isinstance(inst, NumberWithValidations) - - # we can make an instance that stores object (dict) data - inst = ComposedOneOfDifferentTypes(className="Cat", color="black") - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, Animal) - assert isinstance(inst, Cat) - assert isinstance(inst, frozendict.frozendict) - - # object that holds 4 properties and is not an Animal - inst = ComposedOneOfDifferentTypes(a="a", b="b", c="c", d="d") - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert not isinstance(inst, Animal) - assert isinstance(inst, frozendict.frozendict) - - # None - inst = ComposedOneOfDifferentTypes(None) - inst.is_none_oapg() - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, Singleton) - assert isinstance(inst, NoneClass) - assert inst.is_none_oapg() is True - - # date - inst = ComposedOneOfDifferentTypes.from_openapi_data_oapg('2019-01-10') - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, DateSchema) - assert isinstance(inst, str) - assert inst.as_date_oapg.year == 2019 - assert inst.as_date_oapg.month == 1 - assert inst.as_date_oapg.day == 10 - - # date - inst = ComposedOneOfDifferentTypes(date(2019, 1, 10)) - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, DateSchema) - assert isinstance(inst, str) - assert inst.as_date_oapg.year == 2019 - assert inst.as_date_oapg.month == 1 - assert inst.as_date_oapg.day == 10 - - # date-time - inst = ComposedOneOfDifferentTypes.from_openapi_data_oapg('2020-01-02T03:04:05Z') - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, DateTimeSchema) - assert isinstance(inst, str) - assert inst.as_datetime_oapg.year == 2020 - assert inst.as_datetime_oapg.month == 1 - assert inst.as_datetime_oapg.day == 2 - assert inst.as_datetime_oapg.hour == 3 - assert inst.as_datetime_oapg.minute == 4 - assert inst.as_datetime_oapg.second == 5 - utc_tz = tzutc() - assert inst.as_datetime_oapg.tzinfo == utc_tz - - # date-time - inst = ComposedOneOfDifferentTypes(datetime(2020, 1, 2, 3, 4, 5, tzinfo=timezone.utc)) - assert isinstance(inst, ComposedOneOfDifferentTypes) - assert isinstance(inst, DateTimeSchema) - assert isinstance(inst, str) - assert inst.as_datetime_oapg.year == 2020 - assert inst.as_datetime_oapg.month == 1 - assert inst.as_datetime_oapg.day == 2 - assert inst.as_datetime_oapg.hour == 3 - assert inst.as_datetime_oapg.minute == 4 - assert inst.as_datetime_oapg.second == 5 - assert inst.as_datetime_oapg.tzinfo == utc_tz - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_string.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_string.py deleted file mode 100644 index aeb5ea3a972..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_composed_string.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.composed_string import ComposedString - - -class TestComposedString(unittest.TestCase): - """ComposedString unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ComposedString(self): - """Test ComposedString""" - valid_values = [''] - all_values = [None, True, False, 2, 3.14, '', {}, []] - for value in all_values: - if value not in valid_values: - with self.assertRaises(petstore_api.ApiTypeError): - model = ComposedString(value) - continue - model = ComposedString(value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py b/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py deleted file mode 100644 index 1d11ed6cae2..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_configuration.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" -Run the tests. -$ pip install nose (optional) -$ cd OpenAPIetstore-python -$ nosetests -v -""" - -import unittest - -from unittest.mock import patch -import urllib3 -from urllib3._collections import HTTPHeaderDict - -import petstore_api -from petstore_api.api_client import ApiClient -from petstore_api.apis.tags import pet_api - - -class ConfigurationTests(unittest.TestCase): - - def test_configuration(self): - config = petstore_api.Configuration() - config.host = 'https://localhost/' - - config.disabled_client_side_validations = ("multipleOf,maximum,exclusiveMaximum,minimum,exclusiveMinimum," - "maxLength,minLength,pattern,maxItems,minItems") - with self.assertRaisesRegex(ValueError, "Invalid keyword: 'foo'"): - config.disabled_client_side_validations = 'foo' - config.disabled_client_side_validations = "" - - def test_servers(self): - config = petstore_api.Configuration(server_index=1, server_variables={'version': 'v1'}) - client = ApiClient(configuration=config) - api = pet_api.PetApi(client) - - with patch.object(ApiClient, 'request') as mock_request: - mock_request.return_value = urllib3.HTTPResponse(status=200) - api.add_pet({'name': 'pet', 'photoUrls': []}) - mock_request.assert_called_with( - 'POST', - 'https://path-server-test.petstore.local/v2/pet', - headers=HTTPHeaderDict({ - 'Content-Type': 'application/json', - 'User-Agent': 'OpenAPI-Generator/1.0.0/python' - }), - fields=None, - body=b'{"photoUrls":[],"name":"pet"}', - stream=False, - timeout=None, - ) - - with patch.object(ApiClient, 'request') as mock_request: - mock_request.return_value = urllib3.HTTPResponse(status=200) - api.delete_pet(path_params=dict(petId=123456789)) - mock_request.assert_called_with( - 'DELETE', - 'https://localhost:8080/v1/pet/123456789', - headers={'User-Agent': 'OpenAPI-Generator/1.0.0/python'}, - fields=None, - body=None, - stream=False, - timeout=None, - ) \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py deleted file mode 100644 index 336cb29cb39..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_date_time_with_validations.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.date_time_with_validations import DateTimeWithValidations -from datetime import date, datetime, timezone - - -class TestDateTimeWithValidations(unittest.TestCase): - """DateTimeWithValidations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDateTimeWithValidations(self): - """Test DateTimeWithValidations""" - - # works with datetime input - valid_values = [datetime(2020, 1, 1), '2020-01-01T00:00:00'] - expected_datetime = '2020-01-01T00:00:00' - for valid_value in valid_values: - inst = DateTimeWithValidations(valid_value) - assert inst == expected_datetime - - # when passing data in with from_openapi_data_oapg one must use str - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"Invalid type. Required value type is str and passed " - r"type was at \('args\[0\]',\)" - ): - DateTimeWithValidations.from_openapi_data_oapg(datetime(2020, 1, 1)) - - # when passing data from_openapi_data_oapg we can use str - input_value_to_datetime = { - "2020-01-01T00:00:00": datetime(2020, 1, 1, tzinfo=None), - "2020-01-01T00:00:00Z": datetime(2020, 1, 1, tzinfo=timezone.utc), - "2020-01-01T00:00:00+00:00": datetime(2020, 1, 1, tzinfo=timezone.utc) - } - for input_value, expected_datetime in input_value_to_datetime.items(): - inst = DateTimeWithValidations.from_openapi_data_oapg(input_value) - assert inst.as_datetime_oapg == expected_datetime - - # value error is raised if an invalid string is passed in - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Value does not conform to the required ISO-8601 datetime format. Invalid value 'abcd' for type datetime at \('args\[0\]',\)" - ): - DateTimeWithValidations.from_openapi_data_oapg("abcd") - - # value error is raised if a date is passed in - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Value does not conform to the required ISO-8601 datetime format. Invalid value '2020-01-01' for type datetime at \('args\[0\]',\)" - ): - DateTimeWithValidations(date(2020, 1, 1)) - - # pattern checking with string input - error_regex = r"Invalid value `2019-01-01T00:00:00Z`, must match regular expression `.+?` at \('args\[0\]',\)" - with self.assertRaisesRegex( - petstore_api.ApiValueError, - error_regex - ): - DateTimeWithValidations.from_openapi_data_oapg("2019-01-01T00:00:00Z") - # pattern checking with date input - error_regex = r"Invalid value `2019-01-01T00:00:00`, must match regular expression `.+?` at \('args\[0\]',\)" - with self.assertRaisesRegex( - petstore_api.ApiValueError, - error_regex - ): - DateTimeWithValidations(datetime(2019, 1, 1)) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py deleted file mode 100644 index 658470df0e6..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_date_with_validations.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.date_with_validations import DateWithValidations -from datetime import date, datetime - - -class TestDateWithValidations(unittest.TestCase): - """DateWithValidations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testDateWithValidations(self): - """Test DateWithValidations""" - - # client side date inputs - valid_values = [date(2020, 1, 1), '2020-01-01'] - expected_date = '2020-01-01' - for valid_value in valid_values: - inst = DateWithValidations(valid_value) - assert inst == expected_date - - # when passing data in with from_openapi_data_oapg one must use str - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"Invalid type. Required value type is str and passed " - r"type was at \('args\[0\]',\)" - - ): - DateWithValidations.from_openapi_data_oapg(date(2020, 1, 1)) - - # when passing data in from the server we can use str - valid_values = ["2020-01-01", "2020-01", "2020"] - expected_date = date(2020, 1, 1) - for valid_value in valid_values: - inst = DateWithValidations.from_openapi_data_oapg(valid_value) - assert inst.as_date_oapg == expected_date - - # value error is raised if an invalid string is passed in - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Value does not conform to the required ISO-8601 date format. Invalid value '2020-01-01T00:00:00Z' for type date at \('args\[0\]',\)" - ): - DateWithValidations.from_openapi_data_oapg("2020-01-01T00:00:00Z") - - # value error is raised if a datetime is passed in - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Value does not conform to the required ISO-8601 date format. Invalid value '2020-01-01T00:00:00' for type date at \('args\[0\]',\)" - ): - DateWithValidations(datetime(2020, 1, 1)) - - # value error is raised if an invalid string is passed in - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Value does not conform to the required ISO-8601 date format. Invalid value 'abcd' for type date at \('args\[0\]',\)" - ): - DateWithValidations.from_openapi_data_oapg("abcd") - - # pattern checking for str input - error_regex = r"Invalid value `2019-01-01`, must match regular expression `.+?` at \('args\[0\]',\)" - with self.assertRaisesRegex( - petstore_api.ApiValueError, - error_regex - ): - DateWithValidations.from_openapi_data_oapg("2019-01-01") - # pattern checking for date input - with self.assertRaisesRegex( - petstore_api.ApiValueError, - error_regex - ): - DateWithValidations(date(2019, 1, 1)) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_decimal_payload.py b/samples/openapi3/client/petstore/python/tests_manual/test_decimal_payload.py deleted file mode 100644 index 58f77cbf216..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_decimal_payload.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal -import unittest - -import petstore_api -from petstore_api.schemas import DecimalSchema -from petstore_api.model.decimal_payload import DecimalPayload - - -class TestDecimalPayload(unittest.TestCase): - """DecimalPayload unit test stubs""" - - def test_DecimalPayload(self): - """Test DecimalPayload""" - - m = DecimalPayload('12') - assert isinstance(m, DecimalPayload) - assert isinstance(m, DecimalSchema) - assert isinstance(m, str) - assert m == '12' - assert m.as_decimal_oapg == decimal.Decimal('12') - - m = DecimalPayload('12.34') - assert isinstance(m, DecimalPayload) - assert isinstance(m, DecimalSchema) - assert isinstance(m, str) - assert m == '12.34' - assert m.as_decimal_oapg == decimal.Decimal('12.34') - - # passing in a Decimal does not work - with self.assertRaises(petstore_api.ApiTypeError): - DecimalPayload(decimal.Decimal('12.34')) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py deleted file mode 100644 index 525cd78219b..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py +++ /dev/null @@ -1,458 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" -Run the tests. -$ pip install nose (optional) -$ cd OpenAPIPetstore-python -$ nosetests -v -""" -from collections import namedtuple -from decimal import Decimal -import json -import typing -import unittest - -import urllib3 - -import petstore_api -from petstore_api import api_client -from petstore_api.schemas import NoneClass - - -MockResponse = namedtuple('MockResponse', 'data') - - -class DeserializationTests(unittest.TestCase): - json_content_type = 'application/json' - json_content_type_headers = {'content-type': json_content_type} - configuration = petstore_api.Configuration() - - @classmethod - def __response(cls, data: typing.Any) -> urllib3.HTTPResponse: - return urllib3.HTTPResponse( - json.dumps(data).encode('utf-8'), - headers=cls.json_content_type_headers - ) - - def test_deserialize_shape(self): - """ - - deserialize Shape to an instance of: - - EquilateralTriangle - - IsoscelesTriangle - - IsoscelesTriangle - - ScaleneTriangle - - ComplexQuadrilateral - - SimpleQuadrilateral - by traveling through 2 discriminators - """ - from petstore_api.model import shape, equilateral_triangle - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=shape.Shape), - }, - ) - data = { - 'shapeType': 'Triangle', - 'triangleType': 'EquilateralTriangle', - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, equilateral_triangle.EquilateralTriangle)) - self.assertEqual(body['shapeType'], 'Triangle') - self.assertEqual(body['triangleType'], 'EquilateralTriangle') - - # invalid quadrilateralType, second discriminator value - data = { - 'shapeType': 'Quadrilateral', - 'quadrilateralType': 'Triangle', - } - response = self.__response(data) - - err_msg = ( - r"Invalid discriminator value was passed in to Quadrilateral.quadrilateralType Only the values " - r"\['ComplexQuadrilateral', 'SimpleQuadrilateral'\] are allowed at \('args\[0\]', 'quadrilateralType'\)" - ) - with self.assertRaisesRegex(petstore_api.ApiValueError, err_msg): - _response_for_200.deserialize(response, self.configuration) - - def test_deserialize_animal(self): - """ - deserialize Animal to a Dog instance - Animal uses a discriminator which has a map built of child classes - that inherit from Animal - This is the swagger (v2) way of doing something like oneOf composition - """ - from petstore_api.model import animal, dog - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=animal.Animal), - }, - ) - data = { - 'className': 'Dog', - 'color': 'white', - 'breed': 'Jack Russel Terrier' - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, dog.Dog)) - self.assertEqual(body['className'], 'Dog') - self.assertEqual(body['color'], 'white') - self.assertEqual(body['breed'], 'Jack Russel Terrier') - - def test_regex_constraint(self): - """ - Test regex pattern validation. - """ - from petstore_api.model import apple - - # Test with valid regex pattern. - inst = apple.Apple( - cultivar="Akane" - ) - assert isinstance(inst, apple.Apple) - - inst = apple.Apple( - cultivar="Golden Delicious", - origin="cHiLe" - ) - assert isinstance(inst, apple.Apple) - - # Test with invalid regex pattern. - err_regex = r"Invalid value `.+?`, must match regular expression `.+?` at \('args\[0\]', 'cultivar'\)" - with self.assertRaisesRegex( - petstore_api.ApiValueError, - err_regex - ): - inst = apple.Apple( - cultivar="!@#%@$#Akane" - ) - - err_regex = r"Invalid value `.+?`, must match regular expression `.+?` at \('args\[0\]', 'origin'\)" - with self.assertRaisesRegex( - petstore_api.ApiValueError, - err_regex - ): - inst = apple.Apple( - cultivar="Golden Delicious", - origin="!@#%@$#Chile" - ) - - def test_deserialize_mammal(self): - """ - deserialize mammal - mammal is a oneOf composed schema model with discriminator - """ - - # whale test - from petstore_api.model import mammal, zebra, whale - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=mammal.Mammal), - }, - ) - has_baleen = True - has_teeth = False - class_name = 'whale' - data = { - 'hasBaleen': has_baleen, - 'hasTeeth': has_teeth, - 'className': class_name - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, whale.Whale)) - self.assertEqual(bool(body['hasBaleen']), has_baleen) - self.assertEqual(bool(body['hasTeeth']), has_teeth) - self.assertEqual(body.className, class_name) - - # zebra test - zebra_type = 'plains' - class_name = 'zebra' - data = { - 'type': zebra_type, - 'className': class_name - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, zebra.Zebra)) - self.assertEqual(body['type'], zebra_type) - self.assertEqual(body.className, class_name) - - def test_deserialize_float_value(self): - """ - Deserialize floating point values. - """ - from petstore_api.model import banana - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=banana.Banana), - }, - ) - data = { - 'lengthCm': 3.1415 - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, banana.Banana)) - self.assertTrue(isinstance(body.lengthCm, Decimal)) - self.assertEqual(body.lengthCm, 3.1415) - - """ - Float value is serialized without decimal point - The client receive it as an integer, which work because Banana.lengthCm is type number without format - Which accepts int AND float - """ - data = { - 'lengthCm': 3 - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, banana.Banana)) - self.assertTrue(isinstance(body.lengthCm, Decimal)) - self.assertEqual(body.lengthCm, 3) - - def test_deserialize_fruit_null_value(self): - """ - deserialize fruit with null value. - fruitReq is a oneOf composed schema model with discriminator, including 'null' type. - """ - from petstore_api.model import fruit_req - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=fruit_req.FruitReq), - }, - ) - data = None - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - self.assertTrue(isinstance(deserialized.body, fruit_req.FruitReq)) - self.assertTrue(isinstance(deserialized.body, NoneClass)) - - def test_deserialize_with_additional_properties(self): - """ - Deserialize data with schemas that have the additionalProperties keyword. - Test conditions when additional properties are allowed, not allowed, have - specific types... - """ - - # Dog is allOf with two child schemas. - # The OAS document for Dog does not specify the 'additionalProperties' keyword, - # which means that by default, the Dog schema must allow undeclared properties. - # The additionalProperties keyword is used to control the handling of extra stuff, - # that is, properties whose names are not listed in the properties keyword. - # By default any additional properties are allowed. - from petstore_api.model import dog, mammal, zebra, banana_req - data = { - 'className': 'Dog', - 'color': 'brown', - 'breed': 'golden retriever', - # Below are additional, undeclared properties. - 'group': 'Terrier Group', - 'size': 'medium', - } - response = self.__response(data) - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=dog.Dog), - }, - ) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, dog.Dog)) - self.assertEqual(body['className'], 'Dog') - self.assertEqual(body['color'], 'brown') - self.assertEqual(body['breed'], 'golden retriever') - self.assertEqual(body['group'], 'Terrier Group') - self.assertEqual(body['size'], 'medium') - - # The 'zebra' schema allows additional properties by explicitly setting - # additionalProperties: true. - # This is equivalent to 'additionalProperties' not being present. - data = { - 'className': 'zebra', - 'type': 'plains', - # Below are additional, undeclared properties - 'group': 'abc', - 'size': 3, - 'p1': True, - 'p2': ['a', 'b', 123], - } - response = self.__response(data) - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=mammal.Mammal), - }, - ) - deserialized = _response_for_200.deserialize(response, self.configuration) - body = deserialized.body - self.assertTrue(isinstance(body, zebra.Zebra)) - self.assertEqual(body['className'], 'zebra') - self.assertEqual(body['type'], 'plains') - self.assertEqual(bool(body['p1']), True) - - # The 'bananaReq' schema disallows additional properties by explicitly setting - # additionalProperties: false - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=banana_req.BananaReq), - }, - ) - with self.assertRaisesRegex( - petstore_api.exceptions.ApiTypeError, - r"BananaReq was passed 1 invalid argument: \['unknown-group'\]" - ): - data = { - 'lengthCm': 21.2, - 'sweet': False, - # Below are additional, undeclared properties. They are not allowed, - # an exception must be raised. - 'unknown-group': 'abc', - } - response = self.__response(data) - _response_for_200.deserialize(response, self.configuration) - - def test_deserialize_with_additional_properties_and_reference(self): - """ - Deserialize data with schemas that has the additionalProperties keyword - and the schema is specified as a reference ($ref). - """ - from petstore_api.model import drawing - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=drawing.Drawing), - }, - ) - data = { - 'mainShape': { - 'shapeType': 'Triangle', - 'triangleType': 'EquilateralTriangle', - }, - 'shapes': [ - { - 'shapeType': 'Triangle', - 'triangleType': 'IsoscelesTriangle', - }, - { - 'shapeType': 'Quadrilateral', - 'quadrilateralType': 'ComplexQuadrilateral', - }, - ], - 'an_additional_prop': { - 'lengthCm': 4, - 'color': 'yellow' - } - } - response = self.__response(data) - _response_for_200.deserialize(response, self.configuration) - - def test_deserialize_NumberWithValidations(self): - from petstore_api.model.number_with_validations import NumberWithValidations - from petstore_api.paths.fake_refs_number.post import _response_for_200 - - # make sure that an exception is thrown on an invalid type value - with self.assertRaises(petstore_api.ApiTypeError): - response = self.__response('test str') - _response_for_200.deserialize(response, self.configuration) - - # make sure that an exception is thrown on an invalid value - with self.assertRaises(petstore_api.ApiValueError): - response = self.__response(21.0) - _response_for_200.deserialize(response, self.configuration) - - # valid value works - number_val = 11.0 - response = self.__response(number_val) - response = _response_for_200.deserialize(response, self.configuration) - self.assertTrue(isinstance(response.body, NumberWithValidations)) - self.assertEqual(response.body, number_val) - - def test_array_of_enums(self): - from petstore_api.model.array_of_enums import ArrayOfEnums - from petstore_api.paths.fake_refs_array_of_enums.post import _response_for_200 - from petstore_api.model import string_enum - data = ["placed", None] - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - assert isinstance(deserialized.body, ArrayOfEnums) - expected_results = ArrayOfEnums([string_enum.StringEnum(v) for v in data]) - assert expected_results == deserialized.body - - def test_multiple_of_deserialization(self): - data = { - 'byte': '3', - 'date': '1970-01-01', - 'password': "abcdefghijkl", - 'integer': 30, - 'number': 65.0, - 'float': 62.4, - } - from petstore_api.model import format_test - _response_for_200 = api_client.OpenApiResponse( - content={ - self.json_content_type: api_client.MediaType(schema=format_test.FormatTest), - }, - ) - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, self.configuration) - self.assertTrue(isinstance(deserialized.body, format_test.FormatTest)) - - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" - ): - data = { - 'byte': '3', - 'date': '1970-01-01', - 'password': "abcdefghijkl", - 'integer': 31, # Value is supposed to be multiple of '2'. An error must be raised - 'number': 65.0, - 'float': 62.4, - } - response = self.__response(data) - _response_for_200.deserialize(response, self.configuration) - - # Disable JSON schema validation. No error should be raised during deserialization. - configuration = petstore_api.Configuration() - configuration.disabled_client_side_validations = "multipleOf" - - data = { - 'byte': '3', - 'date': '1970-01-01', - 'password': "abcdefghijkl", - 'integer': 31, # Value is supposed to be multiple of '2' - 'number': 65.0, - 'float': 62.4, - } - response = self.__response(data) - deserialized = _response_for_200.deserialize(response, configuration) - self.assertTrue(isinstance(deserialized.body, format_test.FormatTest)) - - # Disable JSON schema validation but for a different keyword. - # An error should be raised during deserialization. - configuration = petstore_api.Configuration() - configuration.disabled_client_side_validations = "maxItems" - - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" - ): - data = { - 'byte': '3', - 'date': '1970-01-01', - 'password': "abcdefghijkl", - 'integer': 31, # Value is supposed to be multiple of '2' - 'number': 65.0, - 'float': 62.4, - } - response = self.__response(data) - _response_for_200.deserialize(response, configuration) diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py deleted file mode 100644 index 97d850d56b6..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py +++ /dev/null @@ -1,157 +0,0 @@ -# # coding: utf-8 -# -# # flake8: noqa -# -# """ -# Run the tests. -# $ docker pull swaggerapi/petstore -# $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore -# $ pip install nose (optional) -# $ cd petstore_api-python -# $ nosetests -v -# """ -# from collections import namedtuple -# import json -# import re -# import unittest -# -# import petstore_api -# from petstore_api.model import cat, dog, isosceles_triangle, banana_req -# from petstore_api import Configuration, signing -# -# from petstore_api.schemas import ( -# file_type, -# model_to_dict, -# ) -# -# MockResponse = namedtuple('MockResponse', 'data') -# -# class DiscardUnknownPropertiesTests(unittest.TestCase): -# -# def test_deserialize_banana_req_do_not_discard_unknown_properties(self): -# """ -# deserialize bananaReq with unknown properties. -# Strict validation is enabled. -# Simple (non-composed) schema scenario. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'lengthCm': 21.3, -# 'sweet': False, -# # Below is an unknown property not explicitly declared in the OpenAPI document. -# # It should not be in the payload because additional properties (undeclared) are -# # not allowed in the bananaReq schema (additionalProperties: false). -# 'unknown_property': 'a-value' -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation raises an exception because the 'unknown_property' -# # is undeclared. -# with self.assertRaises(petstore_api.exceptions.ApiAttributeError) as cm: -# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) -# self.assertTrue(re.match("BananaReq has no attribute 'unknown_property' at.*", str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# -# def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self): -# """ -# deserialize IsoscelesTriangle with unknown properties. -# Strict validation is enabled. -# Composed schema scenario. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'shape_type': 'Triangle', -# 'triangle_type': 'EquilateralTriangle', -# # Below is an unknown property not explicitly declared in the OpenAPI document. -# # It should not be in the payload because additional properties (undeclared) are -# # not allowed in the schema (additionalProperties: false). -# 'unknown_property': 'a-value' -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation raises an exception because the 'unknown_property' -# # is undeclared. -# with self.assertRaises(petstore_api.ApiValueError) as cm: -# deserialized = api_client.deserialize(response, ((isosceles_triangle.IsoscelesTriangle),), True) -# self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# -# def test_deserialize_banana_req_discard_unknown_properties(self): -# """ -# Deserialize bananaReq with unknown properties. -# Discard unknown properties. -# """ -# config = Configuration(discard_unknown_keys=True) -# api_client = petstore_api.ApiClient(config) -# data = { -# 'lengthCm': 21.3, -# 'sweet': False, -# # Below are additional (undeclared) properties not specified in the bananaReq schema. -# 'unknown_property': 'a-value', -# 'more-unknown': [ -# 'a' -# ] -# } -# # The 'unknown_property' is undeclared, which would normally raise an exception, but -# # when discard_unknown_keys is set to True, the unknown properties are discarded. -# response = MockResponse(data=json.dumps(data)) -# deserialized = api_client.deserialize(response, ((banana_req.BananaReq),), True) -# self.assertTrue(isinstance(deserialized, banana_req.BananaReq)) -# # Check the 'unknown_property' and 'more-unknown' properties are not present in the -# # output. -# self.assertIn("length_cm", deserialized.to_dict().keys()) -# self.assertNotIn("unknown_property", deserialized.to_dict().keys()) -# self.assertNotIn("more-unknown", deserialized.to_dict().keys()) -# -# def test_deserialize_cat_do_not_discard_unknown_properties(self): -# """ -# Deserialize Cat with unknown properties. -# Strict validation is enabled. -# """ -# config = Configuration(discard_unknown_keys=False) -# api_client = petstore_api.ApiClient(config) -# data = { -# "class_name": "Cat", -# "color": "black", -# "declawed": True, -# "dynamic-property": 12345, -# } -# response = MockResponse(data=json.dumps(data)) -# -# # Deserializing with strict validation does not raise an exception because the even though -# # the 'dynamic-property' is undeclared, the 'Cat' schema defines the additionalProperties -# # attribute. -# deserialized = api_client.deserialize(response, ((cat.Cat),), True) -# self.assertTrue(isinstance(deserialized, cat.Cat)) -# self.assertIn('color', deserialized.to_dict()) -# self.assertEqual(deserialized['color'], 'black') -# -# def test_deserialize_cat_discard_unknown_properties(self): -# """ -# Deserialize Cat with unknown properties. -# Request to discard unknown properties, but Cat is composed schema -# with one inner schema that has 'additionalProperties' set to true. -# """ -# config = Configuration(discard_unknown_keys=True) -# api_client = petstore_api.ApiClient(config) -# data = { -# "class_name": "Cat", -# "color": "black", -# "declawed": True, -# # Below are additional (undeclared) properties. -# "my_additional_property": 123, -# } -# # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through -# # the allOf: [ $ref: '#/components/schemas/Address' ]. -# response = MockResponse(data=json.dumps(data)) -# deserialized = api_client.deserialize(response, ((cat.Cat),), True) -# self.assertTrue(isinstance(deserialized, cat.Cat)) -# # Check the 'unknown_property' and 'more-unknown' properties are not present in the -# # output. -# self.assertIn("declawed", deserialized.to_dict().keys()) -# self.assertIn("my_additional_property", deserialized.to_dict().keys()) -# diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py b/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py deleted file mode 100644 index 2febc75e362..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_drawing.py +++ /dev/null @@ -1,165 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.schemas import NoneClass -from petstore_api.model import shape -from petstore_api.model import shape_or_null -from petstore_api.model.drawing import Drawing - - -class TestDrawing(unittest.TestCase): - """Drawing unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_create_instances(self): - """ - Validate instance can be created - """ - - inst = shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) - from petstore_api.model.isosceles_triangle import IsoscelesTriangle - assert isinstance(inst, IsoscelesTriangle) - - def test_deserialize_oneof_reference(self): - """ - Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' - schema is specified as a reference ($ref), not an inline 'oneOf' schema. - """ - isosceles_triangle = shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) - from petstore_api.model.isosceles_triangle import IsoscelesTriangle - assert isinstance(isosceles_triangle, IsoscelesTriangle) - from petstore_api.model.equilateral_triangle import EquilateralTriangle - - inst = Drawing( - mainShape=isosceles_triangle, - shapes=[ - shape.Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ), - shape.Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ), - shape.Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ), - shape.Shape( - shapeType="Quadrilateral", - quadrilateralType="ComplexQuadrilateral" - ) - ], - ) - assert isinstance(inst, Drawing) - assert isinstance(inst["mainShape"], IsoscelesTriangle) - self.assertEqual(len(inst["shapes"]), 4) - from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral - assert isinstance(inst["shapes"][0], EquilateralTriangle) - assert isinstance(inst["shapes"][1], IsoscelesTriangle) - assert isinstance(inst["shapes"][2], EquilateralTriangle) - assert isinstance(inst["shapes"][3], ComplexQuadrilateral) - - # Validate we cannot assign the None value to mainShape because the 'null' type - # is not one of the allowed types in the 'Shape' schema. - err_msg = (r"Invalid inputs given to generate an instance of .+?Shape.+? " - r"None of the oneOf schemas matched the input data.") - with self.assertRaisesRegex( - petstore_api.ApiValueError, - err_msg - ): - Drawing( - # 'mainShape' has type 'Shape', which is a oneOf [triangle, quadrilateral] - # So the None value should not be allowed and an exception should be raised. - mainShape=None, - ) - - """ - We can pass in a Triangle instance in shapes - Under the hood it is converted into a dict, and that dict payload - does validate as a Shape, so this works - """ - from petstore_api.model.triangle import Triangle - inst = Drawing( - mainShape=isosceles_triangle, - shapes=[ - Triangle( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ) - ] - ) - self.assertEqual(len(inst["shapes"]), 1) - from petstore_api.model.triangle_interface import TriangleInterface - shapes = inst["shapes"] - assert isinstance(shapes[0], shape.Shape) - assert isinstance(shapes[0], Triangle) - assert isinstance(shapes[0], EquilateralTriangle) - assert isinstance(shapes[0], TriangleInterface) - - def test_deserialize_oneof_reference_with_null_type(self): - """ - Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' - schema is specified as a reference ($ref), not an inline 'oneOf' schema. - Further, the 'oneOf' schema has a 'null' type child schema (as introduced in - OpenAPI 3.1). - """ - - # Validate we can assign the None value to shape_or_null, because the 'null' type - # is one of the allowed types in the 'ShapeOrNull' schema. - inst = Drawing( - # 'shapeOrNull' has type 'ShapeOrNull', which is a oneOf [null, triangle, quadrilateral] - shapeOrNull=None, - ) - assert isinstance(inst, Drawing) - self.assertFalse('mainShape' in inst) - self.assertTrue('shapeOrNull' in inst) - self.assertTrue(isinstance(inst["shapeOrNull"], NoneClass)) - - def test_deserialize_oneof_reference_with_nullable_type(self): - """ - Validate the scenario when the type of a OAS property is 'oneOf', and the 'oneOf' - schema is specified as a reference ($ref), not an inline 'oneOf' schema. - Further, the 'oneOf' schema has the 'nullable' attribute (as introduced in - OpenAPI 3.0 and deprecated in 3.1). - """ - - # Validate we can assign the None value to nullableShape, because the NullableShape - # has the 'nullable: true' attribute. - inst = Drawing( - # 'nullableShape' has type 'NullableShape', which is a oneOf [triangle, quadrilateral] - # and the 'nullable: true' attribute. - nullableShape=None, - ) - assert isinstance(inst, Drawing) - self.assertFalse('mainShape' in inst) - self.assertTrue('nullableShape' in inst) - self.assertTrue(isinstance(inst["nullableShape"], NoneClass)) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_extra_pool_config_options.py b/samples/openapi3/client/petstore/python/tests_manual/test_extra_pool_config_options.py deleted file mode 100644 index 5bf6b989ebe..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_extra_pool_config_options.py +++ /dev/null @@ -1,61 +0,0 @@ -import unittest -from unittest.mock import patch - -import petstore_api - - -class StubPoolManager(object): - actual_kwargs = None - - def __init__(self, num_pools=10, headers=None, **kwargs): - # Matches the contract of urllib3.PoolManager - self.actual_kwargs = kwargs - - -class StubProxyManager: - actual_kwargs = None - - def __init__( - self, - proxy_url, - num_pools=10, - headers=None, - proxy_headers=None, - **kwargs - ): - # Matches the contract of urllib3.ProxyManager - self.actual_kwargs = kwargs - - -class TestExtraOptionsForPools(unittest.TestCase): - - def test_socket_options_get_passed_to_pool_manager(self): - - socket_options = ["extra", "socket", "options"] - - config = petstore_api.Configuration(host="HOST") - config.socket_options = socket_options - - with patch("petstore_api.rest.urllib3.PoolManager", StubPoolManager): - api_client = petstore_api.ApiClient(config) - - # urllib3.PoolManager promises to pass socket_options in kwargs - # to the underlying socket. So asserting that our manager - # gets it is a good start - assert api_client.rest_client.pool_manager.actual_kwargs["socket_options"] == socket_options - - def test_socket_options_get_passed_to_proxy_manager(self): - - socket_options = ["extra", "socket", "options"] - - config = petstore_api.Configuration(host="HOST") - config.socket_options = socket_options - config.proxy = True - - with patch("petstore_api.rest.urllib3.ProxyManager", StubProxyManager): - api_client = petstore_api.ApiClient(config) - - # urllib3.ProxyManager promises to pass socket_options in kwargs - # to the underlying socket. So asserting that our manager - # gets it is a good start - assert api_client.rest_client.pool_manager.actual_kwargs["socket_options"] == socket_options 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 deleted file mode 100644 index 12c108871d6..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fake_api.py +++ /dev/null @@ -1,834 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -from email.mime import multipart -from email.mime import nonmultipart -import io -import sys -import unittest -import typing -from unittest.mock import patch - -import urllib3 -import petstore_api -from petstore_api import api_client, schemas, exceptions -from petstore_api.apis.tags.fake_api import FakeApi # noqa: E501 -from petstore_api.rest import RESTClientObject - -from . import ApiTestMixin - - -class MIMEFormdata(nonmultipart.MIMENonMultipart): - def __init__(self, keyname, *args, **kwargs): - super(MIMEFormdata, self).__init__(*args, **kwargs) - self.add_header( - "Content-Disposition", "form-data; name=\"%s\"" % keyname) - - -class TestFakeApi(ApiTestMixin): - """FakeApi unit test stubs""" - configuration = petstore_api.Configuration() - api = FakeApi(api_client=api_client.ApiClient(configuration=configuration)) - - def test_array_model(self): - from petstore_api.model import animal_farm, animal - - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - json_data = [{"className": "Cat", "color": "black"}] - mock_request.return_value = self.response( - self.json_bytes(json_data) - ) - - cat = animal.Animal(className="Cat", color="black") - body = animal_farm.AnimalFarm([cat]) - api_response = self.api.array_model(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/arraymodel', - body=self.json_bytes(json_data) - ) - - assert isinstance(api_response.body, animal_farm.AnimalFarm) - assert api_response.body == body - - def test_recursionlimit(self): - """Test case for recursionlimit - - """ - assert sys.getrecursionlimit() == 1234 - - def test_array_of_enums(self): - from petstore_api.model import array_of_enums, string_enum - - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - value = [string_enum.StringEnum("placed")] - body = array_of_enums.ArrayOfEnums(value) - value_simple = ["placed"] - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.array_of_enums(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/array-of-enums', - body=self.json_bytes(value_simple) - ) - - assert isinstance(api_response.body, array_of_enums.ArrayOfEnums) - assert api_response.body == body - - def test_number_with_validations(self): - from petstore_api.model import number_with_validations - - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - value = 10.0 - body = number_with_validations.NumberWithValidations(value) - mock_request.return_value = self.response( - self.json_bytes(value) - ) - - api_response = self.api.number_with_validations(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/number', - body=self.json_bytes(value) - ) - - assert isinstance(api_response.body, number_with_validations.NumberWithValidations) - assert api_response.body == value - - def test_composed_one_of_different_types(self): - from petstore_api.model import composed_one_of_different_types - - # serialization + deserialization works - number = composed_one_of_different_types.ComposedOneOfDifferentTypes(10.0) - cat = composed_one_of_different_types.ComposedOneOfDifferentTypes( - className="Cat", color="black" - ) - none_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes(None) - date_instance = composed_one_of_different_types.ComposedOneOfDifferentTypes('1970-01-01') - cast_to_simple_value = [ - (number, 10.0), - (cat, {"className": "Cat", "color": "black"}), - (none_instance, None), - (date_instance, '1970-01-01'), - ] - for (body, value_simple) in cast_to_simple_value: - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.composed_one_of_different_types(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/composed_one_of_number_with_validations', - body=self.json_bytes(value_simple) - ) - - assert isinstance(api_response.body, composed_one_of_different_types.ComposedOneOfDifferentTypes) - assert api_response.body == body - - # inputting the uncast values into the endpoint also works - for (body, value_simple) in cast_to_simple_value: - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.composed_one_of_different_types(body=value_simple) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/composed_one_of_number_with_validations', - body=self.json_bytes(value_simple) - ) - - assert isinstance(api_response.body, composed_one_of_different_types.ComposedOneOfDifferentTypes) - assert api_response.body == body - - def test_string(self): - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - body = "blah" - value_simple = body - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.string(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/string', - body=self.json_bytes(value_simple) - ) - - assert isinstance(api_response.body, str) - assert api_response.body == value_simple - - def test_string_enum(self): - from petstore_api.model import string_enum - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - value = "placed" - body = string_enum.StringEnum(value) - mock_request.return_value = self.response( - self.json_bytes(value) - ) - - api_response = self.api.string_enum(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/enum', - body=self.json_bytes(value) - ) - - assert isinstance(api_response.body, string_enum.StringEnum) - assert api_response.body == value - - def test_mammal(self): - # serialization + deserialization works - from petstore_api.model.mammal import Mammal - with patch.object(RESTClientObject, 'request') as mock_request: - body = Mammal(className="BasquePig") - value_simple = dict(className='BasquePig') - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.mammal(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/refs/mammal', - body=self.json_bytes(value_simple) - ) - - assert isinstance(api_response.body, Mammal) - assert api_response.body == value_simple - - def test_missing_or_unset_required_body(self): - # missing required body - with self.assertRaises(TypeError): - self.api.mammal() - # required body may not be unset - with self.assertRaises(petstore_api.ApiValueError): - self.api.mammal(body=schemas.unset) - - def test_missing_or_unset_required_query_parameter(self): - from petstore_api.model.user import User - user = User({}) - # missing required query param - with self.assertRaises(petstore_api.ApiTypeError): - 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)) - - def test_body_with_query_params(self): - from petstore_api.model import user - with patch.object(RESTClientObject, 'request') as mock_request: - - value_simple = dict( - id=1, - username='first last', - firstName='first', - lastName='last' - ) - body = user.User(**value_simple) - mock_request.return_value = self.response( - b'' - ) - - api_response = self.api.body_with_query_params( - body=body, - query_params=dict(query='hi there') - ) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/body-with-query-params?query=hi%20there', - method='PUT', - body=self.json_bytes(value_simple), - accept_content_type=None - ) - - assert isinstance(api_response.body, api_client.Unset) - assert api_response.response.status == 200 - - def test_upload_download_file_tx_bytes_and_file(self): - """Test case for upload_download_file - uploads a file and downloads a file using application/octet-stream # noqa: E501 - """ - import os - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_name = '1px_pic1.png' - file_path1 = os.path.join(test_file_dir, file_name) - - with open(file_path1, "rb") as some_file: - file_bytes = some_file.read() - file1 = open(file_path1, "rb") - mock_response = self.response( - file_bytes, - content_type='application/octet-stream' - ) - try: - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = mock_response - api_response = self.api.upload_download_file(body=file1) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', - body=file_bytes, - content_type='application/octet-stream', - accept_content_type='application/octet-stream' - ) - self.assertTrue(isinstance(api_response.body, schemas.BinarySchema)) - self.assertTrue(isinstance(api_response.body, schemas.BytesSchema)) - self.assertTrue(isinstance(api_response.body, bytes)) - self.assertEqual(api_response.body, file_bytes) - except petstore_api.ApiException as e: - self.fail("upload_file() raised {0} unexpectedly".format(type(e))) - finally: - file1.close() - - # sending just bytes works also - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = mock_response - api_response = self.api.upload_download_file(body=file_bytes) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', - body=file_bytes, - content_type='application/octet-stream', - accept_content_type='application/octet-stream' - ) - self.assertEqual(api_response.body, file_bytes) - - def test_upload_download_file_rx_file(self): - import os - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_name = '1px_pic1.png' - file_path1 = os.path.join(test_file_dir, file_name) - - with open(file_path1, "rb") as some_file: - file_bytes = some_file.read() - - # passing in file1 as the response body simulates a streamed response - file1 = open(file_path1, "rb") - - class StreamableBody: - """ - This class simulates http.client.HTTPResponse for a streamable response - """ - def __init__(self, file: io.BufferedReader): - self.fp = file - - def read(self, *args, **kwargs): - return self.fp.read(*args, **kwargs) - - def close(self): - self.fp.close() - - streamable_body = StreamableBody(file1) - - mock_response = self.response( - streamable_body, - content_type='application/octet-stream', - preload_content=False - ) - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = mock_response - api_response = self.api.upload_download_file(body=file_bytes, stream=True) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', - body=file_bytes, - content_type='application/octet-stream', - accept_content_type='application/octet-stream', - stream=True - ) - self.assertTrue(file1.closed) - 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.assertEqual(api_response.body.read(), file_bytes) - api_response.body.close() - os.unlink(api_response.body.name) - - file1 = open(file_path1, "rb") - streamable_body = StreamableBody(file1) - saved_file_name = "fileName.abc" - - """ - when streaming is used and the response contains the content disposition header with a filename - that filename is used when saving the file locally - """ - mock_response = self.response( - streamable_body, - content_type='application/octet-stream', - headers={'content-disposition': f'attachment; filename="{saved_file_name}"'}, - preload_content=False - ) - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = mock_response - api_response = self.api.upload_download_file(body=file_bytes, stream=True) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', - body=file_bytes, - content_type='application/octet-stream', - accept_content_type='application/octet-stream', - stream=True - ) - self.assertTrue(file1.closed) - 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.assertEqual(api_response.body.read(), file_bytes) - api_response.body.close() - os.unlink(api_response.body.name) - - """ - when streaming is used and the response contains the content disposition header without a filename - the url of response is used to extract the filename. - """ - file1 = open(file_path1, "rb") - streamable_body = StreamableBody(file1) - expected_filename = "the_file.ext" - - no_filename_mock_response = self.response( - streamable_body, - content_type='application/octet-stream', - headers={'content-disposition': 'attachment'}, - preload_content=False - ) - - with patch.object(RESTClientObject, 'request') as mock_request: - no_filename_mock_response.geturl = lambda: f'http://foo.bar/{expected_filename}' - mock_request.return_value = no_filename_mock_response - api_response = self.api.upload_download_file(body=file_bytes, stream=True) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadDownloadFile', - body=file_bytes, - content_type='application/octet-stream', - accept_content_type='application/octet-stream', - stream=True - ) - self.assertTrue(file1.closed) - 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.assertEqual(api_response.body.read(), file_bytes) - api_response.body.close() - os.unlink(api_response.body.name) - - def test_upload_file(self): - """Test case for upload_file - uploads a file using multipart/form-data # noqa: E501 - """ - import os - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_name = '1px_pic1.png' - file_path1 = os.path.join(test_file_dir, file_name) - - with open(file_path1, "rb") as some_file: - file_bytes = some_file.read() - file1 = open(file_path1, "rb") - response_json = { - 'code': 200, - 'type': 'blah', - 'message': 'file upload succeeded' - } - try: - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(response_json) - ) - api_response = self.api.upload_file(body={'file': file1}) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadFile', - fields=( - api_client.RequestField( - name='file', - data=file_bytes, - filename=file_name, - headers={ - 'Content-Location': None, - 'Content-Type': 'image/png', - "Content-Disposition": "form-data; name=\"file\"; filename=\"1px_pic1.png\"" - } - ), - ), - content_type='multipart/form-data' - ) - self.assertEqual(api_response.body, response_json) - except petstore_api.ApiException as e: - self.fail("upload_file() raised {0} unexpectedly".format(type(e))) - finally: - file1.close() - - # sending just bytes works also - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(response_json) - ) - api_response = self.api.upload_file(body={'file': file_bytes}) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadFile', - fields=( - api_client.RequestField( - name='file', - data=file_bytes, - headers={ - 'Content-Type': 'application/octet-stream', - "Content-Disposition": "form-data; name=\"file\"", - "Content-Location": None - } - ), - ), - content_type='multipart/form-data' - ) - self.assertEqual(api_response.body, response_json) - - # 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() - - # passing in a closed file raises an exception - with self.assertRaises(ValueError): - file = open(file_path1, "rb") - file.close() - self.api.upload_file(body={'file': file}) - - def test_upload_files(self): - """Test case for upload_files - uploads files using multipart/form-data # noqa: E501 - """ - import os - test_file_dir = os.path.realpath( - os.path.join(os.path.dirname(__file__), "..", "testfiles")) - file_name = '1px_pic1.png' - file_path1 = os.path.join(test_file_dir, file_name) - - with open(file_path1, "rb") as some_file: - file_bytes = some_file.read() - file1 = open(file_path1, "rb") - file2 = open(file_path1, "rb") - response_json = { - 'code': 200, - 'type': 'blah', - 'message': 'file upload succeeded' - } - try: - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(response_json) - ) - api_response = self.api.upload_files(body={'files': [file1, file2]}) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadFiles', - fields=( - api_client.RequestField( - name='files', - data=file_bytes, - filename=file_name, - headers={ - 'Content-Type': 'image/png', - "Content-Disposition": "form-data; name=\"files\"; filename=\"1px_pic1.png\"", - "Content-Location": None - } - ), - api_client.RequestField( - name='files', - data=file_bytes, - filename=file_name, - headers={ - 'Content-Type': 'image/png', - "Content-Disposition": "form-data; name=\"files\"; filename=\"1px_pic1.png\"", - "Content-Location": None - - } - ), - ), - content_type='multipart/form-data' - ) - self.assertEqual(api_response.body, response_json) - except petstore_api.ApiException as e: - self.fail("upload_file() raised {0} unexpectedly".format(type(e))) - finally: - file1.close() - file2.close() - - # sending just bytes works also - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - self.json_bytes(response_json) - ) - api_response = self.api.upload_files(body={'files': [file_bytes, file_bytes]}) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/uploadFiles', - fields=( - api_client.RequestField( - name='files', - data=file_bytes, - headers={ - 'Content-Type': 'application/octet-stream', - "Content-Disposition": "form-data; name=\"files\"", - "Content-Location": None - } - ), - api_client.RequestField( - name='files', - data=file_bytes, - headers={ - 'Content-Type': 'application/octet-stream', - "Content-Disposition": "form-data; name=\"files\"", - "Content-Location": None - } - ), - ), - content_type='multipart/form-data' - ) - self.assertEqual(api_response.body, response_json) - - @staticmethod - def __encode_multipart_formdata(fields: typing.Dict[str, typing.Any]) -> multipart.MIMEMultipart: - m = multipart.MIMEMultipart("form-data") - - for field, value in fields.items(): - data = MIMEFormdata(field, "text", "plain") - # data.set_payload(value, charset='us-ascii') - data.set_payload(value) - m.attach(data) - - return m - - @patch.object(RESTClientObject, 'request') - def test_inline_composition(self, mock_request): - """Test case for inline_composition - - testing composed schemas at inline locations # noqa: E501 - """ - single_char_str = 'a' - json_bytes = self.json_bytes(single_char_str) - - # tx and rx json with composition at root level of schema for request + response body - content_type = 'application/json' - mock_request.return_value = self.response( - json_bytes - ) - api_response = self.api.inline_composition( - body=single_char_str, - query_params={ - 'compositionAtRoot': single_char_str, - 'compositionInProperty': {'someProp': single_char_str} - }, - accept_content_types=(content_type,) - ) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/inlineComposition/?compositionAtRoot=a&someProp=a', - accept_content_type=content_type, - content_type=content_type, - body=json_bytes - ) - self.assertEqual(api_response.body, single_char_str) - self.assertTrue(isinstance(api_response.body, schemas.StrSchema)) - - # tx and rx json with composition at property level of schema for request + response body - content_type = 'multipart/form-data' - multipart_response = self.__encode_multipart_formdata(fields={'someProp': single_char_str}) - mock_request.return_value = self.response( - bytes(multipart_response), - content_type=multipart_response.get_content_type() - ) - api_response = self.api.inline_composition( - body={'someProp': single_char_str}, - query_params={ - 'compositionAtRoot': single_char_str, - 'compositionInProperty': {'someProp': single_char_str} - }, - content_type=content_type, - accept_content_types=(content_type,) - ) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/inlineComposition/?compositionAtRoot=a&someProp=a', - accept_content_type=content_type, - content_type=content_type, - fields=( - api_client.RequestField( - name='someProp', - data=single_char_str, - headers={ - 'Content-Type': 'text/plain', - "Content-Disposition": "form-data; name=\"someProp\"", - "Content-Location": None - } - ), - ), - ) - self.assertEqual(api_response.body, {'someProp': single_char_str}) - self.assertTrue(isinstance(api_response.body["someProp"], schemas.StrSchema)) - - # error thrown when a str is input which doesn't meet the composed schema length constraint - invalid_value = '' - variable_locations = 4 - for invalid_index in range(variable_locations): - values = [single_char_str]*variable_locations - values[invalid_index] = invalid_value - with self.assertRaises(exceptions.ApiValueError): - multipart_response = self.__encode_multipart_formdata(fields={'someProp': values[0]}) - mock_request.return_value = self.response( - bytes(multipart_response), - content_type=multipart_response.get_content_type() - ) - self.api.inline_composition( - body={'someProp': values[1]}, - query_params={ - 'compositionAtRoot': values[2], - 'compositionInProperty': {'someProp': values[3]} - }, - content_type=content_type, - accept_content_types=(content_type,) - ) - - def test_json_with_charset(self): - # serialization + deserialization of json with charset works - with patch.object(RESTClientObject, 'request') as mock_request: - body = None - content_type_with_charset = 'application/json; charset=utf-8' - mock_request.return_value = self.response( - self.json_bytes(body), - content_type=content_type_with_charset - ) - - api_response = self.api.json_with_charset(body=body) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/jsonWithCharset', - body=self.json_bytes(body), - content_type=content_type_with_charset, - accept_content_type=content_type_with_charset - ) - - assert isinstance(api_response.body, schemas.AnyTypeSchema) - assert isinstance(api_response.body, schemas.NoneClass) - assert api_response.body.is_none_oapg() - - def test_response_without_schema(self): - # received response is not loaded into body because there is no deserialization schema defined - with patch.object(RESTClientObject, 'request') as mock_request: - body = None - content_type = 'application/json' - mock_request.return_value = self.response( - self.json_bytes(body), - ) - - api_response = self.api.response_without_schema() - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/responseWithoutSchema', - method='GET', - accept_content_type='application/json, application/xml', - content_type=None - ) - - assert isinstance(api_response.body, schemas.Unset) - - - with patch.object(RESTClientObject, 'request') as mock_request: - mock_request.return_value = self.response( - 'blah', - content_type='text/plain' - ) - - # when an incorrect content-type is sent back, and exception is raised - with self.assertRaises(exceptions.ApiValueError): - self.api.response_without_schema() - - def test_delete_endpoint_without_request_body(self): - with patch.object(urllib3.PoolManager, 'request') as mock_request: - - body = None - mock_request.return_value = self.response( - self.json_bytes(body), - ) - - api_response = self.api.delete_coffee(path_params=dict(id='1')) - self.assert_pool_manager_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/deleteCoffee/1', - method='DELETE', - content_type=None, - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - assert isinstance(api_response.headers, schemas.Unset) - - def test_json_patch(self): - with patch.object(urllib3.PoolManager, 'request') as mock_request: - from petstore_api.model import json_patch_request - from petstore_api.model import json_patch_request_add_replace_test - - mock_request.return_value = self.response("") - body = json_patch_request.JSONPatchRequest( - [ - json_patch_request_add_replace_test.JSONPatchRequestAddReplaceTest( - op='add', - path='/a/b/c', - value='foo', - ) - ] - ) - api_response = self.api.json_patch(body=body) - json_body = [ - { - 'op': 'add', - 'path': '/a/b/c', - 'value': 'foo' - } - ] - self.assert_pool_manager_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/fake/jsonPatch', - body=self.json_bytes(json_body), - method='PATCH', - content_type='application/json-patch+json', - accept_content_type=None, - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py b/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py deleted file mode 100644 index 960d0957517..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_format_test.py +++ /dev/null @@ -1,137 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -from decimal import Decimal -import datetime -import unittest - -import frozendict - -import petstore_api -from petstore_api.model.format_test import FormatTest -from petstore_api.schemas import BinarySchema, BytesSchema, Singleton - - -class TestFormatTest(unittest.TestCase): - """FormatTest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_FormatTest(self): - """Test FormatTest""" - - required_args = dict( - number=32.5, - byte='a', - date='2021-01-01', - password='abcdefghij' - ) - # int32 - # under min - with self.assertRaises(petstore_api.ApiValueError): - model = FormatTest(int32=-2147483649, **required_args) - # over max - with self.assertRaises(petstore_api.ApiValueError): - model = FormatTest(int32=2147483648, **required_args) - # valid values in range work - valid_values = [-2147483648, 2147483647] - for valid_value in valid_values: - model = FormatTest(int32=valid_value, **required_args) - assert model["int32"] == valid_value - - # int64 - # under min - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(int64=-9223372036854775809, **required_args) - # over max - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(int64=9223372036854775808, **required_args) - # valid values in range work - valid_values = [-9223372036854775808, 9223372036854775807] - for valid_value in valid_values: - model = FormatTest(int64=valid_value, **required_args) - assert model["int64"] == valid_value - - # float32 - # under min - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float32=-3.402823466385289e+38, **required_args) - # over max - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float32=3.402823466385289e+38, **required_args) - # valid values in range work - valid_values = [-3.4028234663852886e+38, 3.4028234663852886e+38] - for valid_value in valid_values: - model = FormatTest(float32=valid_value, **required_args) - assert model["float32"] == valid_value - - # float64 - # under min, Decimal is used because flat can only store 64bit numbers and the max and min - # take up more space than 64bit - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float64=Decimal('-1.7976931348623157082e+308'), **required_args) - # over max - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(float64=Decimal('1.7976931348623157082e+308'), **required_args) - valid_values = [-1.7976931348623157E+308, 1.7976931348623157E+308] - for valid_value in valid_values: - model = FormatTest(float64=valid_value, **required_args) - assert model["float64"] == valid_value - - # unique_items with duplicates throws exception - with self.assertRaises(petstore_api.ApiValueError): - FormatTest(arrayWithUniqueItems=[0, 1, 1], **required_args) - # no duplicates works - values = [0, 1, 2] - model = FormatTest(arrayWithUniqueItems=values, **required_args) - assert model["arrayWithUniqueItems"] == tuple(values) - - # __bool__ value of noneProp is False - model = FormatTest(noneProp=None, **required_args) - assert isinstance(model["noneProp"], Singleton) - self.assertFalse(model["noneProp"]) - self.assertTrue(model["noneProp"].is_none_oapg()) - - # binary check - model = FormatTest(binary=b'123', **required_args) - assert isinstance(model["binary"], BinarySchema) - assert isinstance(model["binary"], BytesSchema) - assert isinstance(model["binary"], bytes) - assert model == frozendict.frozendict( - binary=b'123', - number=Decimal(32.5), - byte='a', - date='2021-01-01', - password='abcdefghij' - ) - - def test_multiple_of(self): - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Invalid value `31`, value must be a multiple of `2` at \('args\[0\]', 'integer'\)" - ): - FormatTest( - byte='3', - date=datetime.date(2000, 1, 1), - password="abcdefghijkl", - integer=31, # Value is supposed to be multiple of '2'. An error must be raised - number=65.0, - float=62.4 - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py deleted file mode 100644 index 6f1a2265553..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model import apple -from petstore_api.model import banana -from petstore_api.model.fruit import Fruit -from petstore_api import schemas - - -class TestFruit(unittest.TestCase): - """Fruit unit test stubs""" - - def testFruit(self): - """Test Fruit""" - - # make an instance of Fruit, a composed schema oneOf model - # banana test - length_cm = 20.3 - color = 'yellow' - fruit = Fruit(lengthCm=length_cm, color=color) - # check its properties - self.assertEqual(fruit['lengthCm'], length_cm) - self.assertEqual(fruit.get('lengthCm'), length_cm) - self.assertEqual(fruit['color'], color) - self.assertEqual(fruit.get('color'), color) - - # check the dict representation - self.assertEqual( - fruit, - { - 'lengthCm': length_cm, - 'color': color - } - ) - # setting values after instance creation is not allowed - with self.assertRaises(TypeError): - fruit['color'] = 'some value' - - # getting a value that doesn't exist raises an exception - # with a key - with self.assertRaises(KeyError): - assert fruit['cultivar'] - assert fruit.get_item_oapg('cultivar') is schemas.unset - - # make sure that the ModelComposed class properties are correct - self.assertEqual( - Fruit.MetaOapg.one_of(), - [ - apple.Apple, - banana.Banana, - ], - ) - - """ - including extra parameters does not raise an exception - because objects support additional properties by default - """ - kwargs = dict( - color=color, - lengthCm=length_cm, - additional_string='some value', - additional_date='2021-01-02', - ) - - fruit = Fruit.from_openapi_data_oapg(**kwargs) - self.assertEqual( - fruit, - kwargs - ) - - fruit = Fruit(**kwargs) - self.assertEqual( - fruit, - kwargs - ) - - # including input parameters for two oneOf instances raise an exception - with self.assertRaises(petstore_api.ApiValueError): - Fruit( - lengthCm=length_cm, - cultivar='granny smith' - ) - - # make an instance of Fruit, a composed schema oneOf model - # apple test - color = 'red' - cultivar = 'golden delicious' - fruit = Fruit(color=color, cultivar=cultivar) - # check its properties - self.assertEqual(fruit['color'], color) - self.assertEqual(fruit['cultivar'], cultivar) - # check the dict representation - self.assertEqual( - fruit, - { - 'color': color, - 'cultivar': cultivar - } - ) - - def testFruitNullValue(self): - # Since 'apple' is nullable, validate we can create an apple with the 'null' value. - fruit = apple.Apple(None) - assert isinstance(fruit, schemas.Singleton) - assert isinstance(fruit, apple.Apple) - assert fruit.is_none_oapg() is True - - # 'banana' is not nullable. - # TODO cast this into ApiTypeError? - with self.assertRaises(TypeError): - banana.Banana(None) - - # Since 'fruit' has oneOf 'apple', 'banana' and 'apple' is nullable, - # validate we can create a fruit with the 'null' value. - fruit = Fruit(None) - assert isinstance(fruit, schemas.Singleton) - assert isinstance(fruit, apple.Apple) - assert isinstance(fruit, Fruit) - assert fruit.is_none_oapg() is True - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py deleted file mode 100644 index bdabb193648..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model import apple_req -from petstore_api.model import banana_req -from petstore_api.model.fruit_req import FruitReq -from petstore_api import schemas - - -class TestFruitReq(unittest.TestCase): - """FruitReq unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testFruitReq(self): - """Test FruitReq""" - - # make an instance of Fruit, a composed schema oneOf model - # banana test - length_cm = 20.3 - fruit = FruitReq(lengthCm=length_cm) - # check its properties - self.assertEqual(fruit.lengthCm, length_cm) - self.assertEqual(fruit['lengthCm'], length_cm) - self.assertEqual(getattr(fruit, 'lengthCm'), length_cm) - # check the dict representation - self.assertEqual( - fruit, - { - 'lengthCm': length_cm, - } - ) - # setting values after instance creation is not allowed - with self.assertRaises(TypeError): - fruit['lengthCm'] = 'some value' - - # setting values after instance creation is not allowed - with self.assertRaises(AttributeError): - setattr(fruit, 'lengthCm', 'some value') - - # getting a value that doesn't exist raises an exception - # with a key - with self.assertRaises(KeyError): - fruit['cultivar'] - with self.assertRaises(AttributeError): - fruit.cultivar - assert fruit.get_item_oapg('cultivar') is schemas.unset - - # with getattr - self.assertEqual(getattr(fruit, 'cultivar', 'some value'), 'some value') - - with self.assertRaises(AttributeError): - getattr(fruit, 'cultivar') - - # make sure that the ModelComposed class properties are correct - self.assertEqual( - FruitReq.MetaOapg.one_of(), - [ - schemas.NoneSchema, - apple_req.AppleReq, - banana_req.BananaReq, - ], - ) - - # including extra parameters raises an exception - with self.assertRaises(petstore_api.ApiValueError): - FruitReq( - length_cm=length_cm, - unknown_property='some value' - ) - - # including input parameters for two oneOf instances raise an exception - with self.assertRaises(petstore_api.ApiValueError): - FruitReq( - length_cm=length_cm, - cultivar='granny smith' - ) - - # make an instance of Fruit, a composed schema oneOf model - # apple test - cultivar = 'golden delicious' - fruit = FruitReq(cultivar=cultivar) - # check its properties - self.assertEqual(fruit.cultivar, cultivar) - self.assertEqual(fruit['cultivar'], cultivar) - self.assertEqual(getattr(fruit, 'cultivar'), cultivar) - # check the dict representation - self.assertEqual( - fruit, - { - 'cultivar': cultivar - } - ) - - # we can pass in None - fruit = FruitReq(None) - assert isinstance(fruit, schemas.Singleton) - assert isinstance(fruit, FruitReq) - assert isinstance(fruit, schemas.NoneSchema) - assert fruit.is_none_oapg() is True - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py deleted file mode 100644 index ad650460a4c..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import frozendict - -from petstore_api.model import apple -from petstore_api.model import banana -from petstore_api.model.gm_fruit import GmFruit -from petstore_api import schemas - -class TestGmFruit(unittest.TestCase): - """GmFruit unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testGmFruit(self): - """Test GmFruit""" - - # make an instance of GmFruit, a composed schema anyOf model - # banana test - length_cm = 20.3 - color = 'yellow' - cultivar = 'banaple' - fruit = GmFruit(lengthCm=length_cm, color=color, cultivar=cultivar) - assert isinstance(fruit, banana.Banana) - assert isinstance(fruit, apple.Apple) - assert isinstance(fruit, frozendict.frozendict) - assert isinstance(fruit, GmFruit) - # check its properties - self.assertEqual(fruit['lengthCm'], length_cm) - self.assertEqual(fruit['color'], color) - - # check the dict representation - self.assertEqual( - fruit, - { - 'lengthCm': length_cm, - 'color': color, - 'cultivar': cultivar - } - ) - - # unset key access raises KeyError - with self.assertRaises(KeyError): - fruit["origin"] - with self.assertRaises(AttributeError): - fruit.origin - assert fruit.get_item_oapg("origin") is schemas.unset - - with self.assertRaises(KeyError): - fruit['unknown_variable'] - assert fruit.get_item_oapg("unknown_variable") is schemas.unset - # with getattr - self.assertTrue(getattr(fruit, 'origin', 'some value'), 'some value') - - # make sure that the ModelComposed class properties are correct - self.assertEqual( - GmFruit.MetaOapg.any_of(), - [ - apple.Apple, - banana.Banana, - ], - ) - - # including extra parameters works - GmFruit( - color=color, - length_cm=length_cm, - cultivar=cultivar, - unknown_property='some value' - ) - - # including input parameters for both anyOf instances works - color = 'orange' - fruit = GmFruit( - color=color, - cultivar=cultivar, - length_cm=length_cm - ) - self.assertEqual(fruit['color'], color) - self.assertEqual(fruit['cultivar'], cultivar) - self.assertEqual(fruit['length_cm'], length_cm) - - # make an instance of GmFruit, a composed schema anyOf model - # apple test - color = 'red' - cultivar = 'golden delicious' - origin = 'California' - fruit = GmFruit(color=color, cultivar=cultivar, origin=origin) - # check its properties - self.assertEqual(fruit['color'], color) - self.assertEqual(fruit['cultivar'], cultivar) - self.assertEqual(fruit['origin'], origin) - - # check the dict representation - self.assertEqual( - fruit, - { - 'color': color, - 'cultivar': cultivar, - 'origin': origin, - } - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py b/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py deleted file mode 100644 index d1e09d1ba11..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_http_signature.py +++ /dev/null @@ -1,518 +0,0 @@ -# # coding: utf-8 -# -# # flake8: noqa -# -# """ -# Run the tests. -# $ docker pull swaggerapi/petstore -# $ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore -# $ pip install nose (optional) -# $ cd petstore_api-python -# $ nosetests -v -# """ -# -# from collections import namedtuple -# from datetime import datetime, timedelta -# import base64 -# import json -# import os -# import re -# import shutil -# import unittest -# from urllib.parse import urlencode, urlparse -# -# from Crypto.Hash import SHA256, SHA512 -# from Crypto.PublicKey import ECC, RSA -# from Crypto.Signature import pkcs1_15, pss, DSS -# -# import petstore_api -# from petstore_api.model import category, tag, pet -# from petstore_api.apis.tags.pet_api import PetApi -# from petstore_api import Configuration, signing -# from petstore_api.rest import ( -# RESTClientObject, -# RESTResponse -# ) -# -# from petstore_api.exceptions import ( -# ApiException, -# ApiValueError, -# ApiTypeError, -# ) -# -# from .util import id_gen -# -# import urllib3 -# -# from unittest.mock import patch -# -# HOST = 'http://localhost/v2' -# -# # This test RSA private key below is published in Appendix C 'Test Values' of -# # https://www.ietf.org/id/draft-cavage-http-signatures-12.txt -# RSA_TEST_PRIVATE_KEY = """-----BEGIN RSA PRIVATE KEY----- -# MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF -# NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F -# UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB -# AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA -# QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK -# kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg -# f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u -# 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc -# mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7 -# kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA -# gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW -# G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI -# 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA== -# -----END RSA PRIVATE KEY-----""" -# -# -# class TimeoutWithEqual(urllib3.Timeout): -# def __init__(self, *arg, **kwargs): -# super(TimeoutWithEqual, self).__init__(*arg, **kwargs) -# -# def __eq__(self, other): -# return self._read == other._read and self._connect == other._connect and self.total == other.total -# -# class MockPoolManager(object): -# def __init__(self, tc): -# self._tc = tc -# self._reqs = [] -# -# def expect_request(self, *args, **kwargs): -# self._reqs.append((args, kwargs)) -# -# def set_signing_config(self, signing_cfg): -# self.signing_cfg = signing_cfg -# self._tc.assertIsNotNone(self.signing_cfg) -# self.pubkey = self.signing_cfg.get_public_key() -# self._tc.assertIsNotNone(self.pubkey) -# -# def request(self, *actual_request_target, **actual_request_headers_and_body): -# self._tc.assertTrue(len(self._reqs) > 0) -# expected_results = self._reqs.pop(0) -# self._tc.maxDiff = None -# expected_request_target = expected_results[0] # The expected HTTP method and URL path. -# expected_request_headers_and_body = expected_results[1] # dict that contains the expected body, headers -# self._tc.assertEqual(expected_request_target, actual_request_target) -# # actual_request_headers_and_body is a dict that contains the actual body, headers -# for k, expected in expected_request_headers_and_body.items(): -# self._tc.assertIn(k, actual_request_headers_and_body) -# if k == 'body': -# actual_body = actual_request_headers_and_body[k] -# self._tc.assertEqual(expected, actual_body) -# elif k == 'headers': -# actual_headers = actual_request_headers_and_body[k] -# for expected_header_name, expected_header_value in expected.items(): -# # Validate the generated request contains the expected header. -# self._tc.assertIn(expected_header_name, actual_headers) -# actual_header_value = actual_headers[expected_header_name] -# # Compare the actual value of the header against the expected value. -# pattern = re.compile(expected_header_value) -# m = pattern.match(actual_header_value) -# self._tc.assertTrue(m, msg="Expected:\n{0}\nActual:\n{1}".format( -# expected_header_value,actual_header_value)) -# if expected_header_name == 'Authorization': -# self._validate_authorization_header( -# expected_request_target, actual_headers, actual_header_value) -# elif k == 'timeout': -# self._tc.assertEqual(expected, actual_request_headers_and_body[k]) -# return urllib3.HTTPResponse(status=200, body=b'test') -# -# def _validate_authorization_header(self, request_target, actual_headers, authorization_header): -# """Validate the signature. -# """ -# # Extract (created) -# r1 = re.compile(r'created=([0-9]+)') -# m1 = r1.search(authorization_header) -# self._tc.assertIsNotNone(m1) -# created = m1.group(1) -# -# # Extract list of signed headers -# r1 = re.compile(r'headers="([^"]+)"') -# m1 = r1.search(authorization_header) -# self._tc.assertIsNotNone(m1) -# headers = m1.group(1).split(' ') -# signed_headers_list = [] -# for h in headers: -# if h == '(created)': -# signed_headers_list.append((h, created)) -# elif h == '(request-target)': -# url = request_target[1] -# target_path = urlparse(url).path -# signed_headers_list.append((h, "{0} {1}".format(request_target[0].lower(), target_path))) -# else: -# value = next((v for k, v in actual_headers.items() if k.lower() == h), None) -# self._tc.assertIsNotNone(value) -# signed_headers_list.append((h, value)) -# header_items = [ -# "{0}: {1}".format(key.lower(), value) for key, value in signed_headers_list] -# string_to_sign = "\n".join(header_items) -# digest = None -# if self.signing_cfg.hash_algorithm == signing.HASH_SHA512: -# digest = SHA512.new() -# elif self.signing_cfg.hash_algorithm == signing.HASH_SHA256: -# digest = SHA256.new() -# else: -# self._tc.fail("Unsupported hash algorithm: {0}".format(self.signing_cfg.hash_algorithm)) -# digest.update(string_to_sign.encode()) -# b64_body_digest = base64.b64encode(digest.digest()).decode() -# -# # Extract the signature -# r2 = re.compile(r'signature="([^"]+)"') -# m2 = r2.search(authorization_header) -# self._tc.assertIsNotNone(m2) -# b64_signature = m2.group(1) -# signature = base64.b64decode(b64_signature) -# # Build the message -# signing_alg = self.signing_cfg.signing_algorithm -# if signing_alg is None: -# # Determine default -# if isinstance(self.pubkey, RSA.RsaKey): -# signing_alg = signing.ALGORITHM_RSASSA_PSS -# elif isinstance(self.pubkey, ECC.EccKey): -# signing_alg = signing.ALGORITHM_ECDSA_MODE_FIPS_186_3 -# else: -# self._tc.fail("Unsupported key: {0}".format(type(self.pubkey))) -# -# if signing_alg == signing.ALGORITHM_RSASSA_PKCS1v15: -# pkcs1_15.new(self.pubkey).verify(digest, signature) -# elif signing_alg == signing.ALGORITHM_RSASSA_PSS: -# pss.new(self.pubkey).verify(digest, signature) -# elif signing_alg == signing.ALGORITHM_ECDSA_MODE_FIPS_186_3: -# verifier = DSS.new(key=self.pubkey, mode=signing.ALGORITHM_ECDSA_MODE_FIPS_186_3, -# encoding='der') -# verifier.verify(digest, signature) -# elif signing_alg == signing.ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979: -# verifier = DSS.new(key=self.pubkey, mode=signing.ALGORITHM_ECDSA_MODE_DETERMINISTIC_RFC6979, -# encoding='der') -# verifier.verify(digest, signature) -# else: -# self._tc.fail("Unsupported signing algorithm: {0}".format(signing_alg)) -# -# class PetApiTests(unittest.TestCase): -# -# @classmethod -# def setUpClass(cls): -# cls.setUpModels() -# cls.setUpFiles() -# -# @classmethod -# def tearDownClass(cls): -# file_paths = [ -# cls.rsa_key_path, -# cls.rsa4096_key_path, -# cls.ec_p521_key_path, -# ] -# for file_path in file_paths: -# os.unlink(file_path) -# -# @classmethod -# def setUpModels(cls): -# cls.category = category.Category() -# cls.category.id = id_gen() -# cls.category.name = "dog" -# cls.tag = tag.Tag() -# cls.tag.id = id_gen() -# cls.tag.name = "python-pet-tag" -# cls.pet = pet.Pet( -# name="hello kity", -# photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"] -# ) -# cls.pet.id = id_gen() -# cls.pet.status = "sold" -# cls.pet.category = cls.category -# cls.pet.tags = [cls.tag] -# -# @classmethod -# def setUpFiles(cls): -# cls.test_file_dir = os.path.join( -# os.path.dirname(__file__), "..", "testfiles") -# cls.test_file_dir = os.path.realpath(cls.test_file_dir) -# if not os.path.exists(cls.test_file_dir): -# os.mkdir(cls.test_file_dir) -# -# cls.private_key_passphrase = 'test-passphrase' -# cls.rsa_key_path = os.path.join(cls.test_file_dir, 'rsa.pem') -# cls.rsa4096_key_path = os.path.join(cls.test_file_dir, 'rsa4096.pem') -# cls.ec_p521_key_path = os.path.join(cls.test_file_dir, 'ecP521.pem') -# -# if not os.path.exists(cls.rsa_key_path): -# with open(cls.rsa_key_path, 'w') as f: -# f.write(RSA_TEST_PRIVATE_KEY) -# -# if not os.path.exists(cls.rsa4096_key_path): -# key = RSA.generate(4096) -# private_key = key.export_key( -# passphrase=cls.private_key_passphrase, -# protection='PEM' -# ) -# with open(cls.rsa4096_key_path, "wb") as f: -# f.write(private_key) -# -# if not os.path.exists(cls.ec_p521_key_path): -# key = ECC.generate(curve='P-521') -# private_key = key.export_key( -# format='PEM', -# passphrase=cls.private_key_passphrase, -# use_pkcs8=True, -# protection='PBKDF2WithHMAC-SHA1AndAES128-CBC' -# ) -# with open(cls.ec_p521_key_path, "wt") as f: -# f.write(private_key) -# -# def test_valid_http_signature(self): -# privkey_path = self.rsa_key_path -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=privkey_path, -# private_key_passphrase=self.private_key_passphrase, -# signing_algorithm=signing.ALGORITHM_RSASSA_PKCS1v15, -# signed_headers=[ -# signing.HEADER_REQUEST_TARGET, -# signing.HEADER_CREATED, -# signing.HEADER_HOST, -# signing.HEADER_DATE, -# signing.HEADER_DIGEST, -# 'Content-Type' -# ] -# ) -# config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 access_token to None. Here we are interested in testing -# # the HTTP signature scheme. -# config.access_token = None -# -# api_client = petstore_api.ApiClient(config) -# pet_api = PetApi(api_client) -# -# mock_pool = MockPoolManager(self) -# api_client.rest_client.pool_manager = mock_pool -# -# mock_pool.set_signing_config(signing_cfg) -# mock_pool.expect_request('POST', HOST + '/pet', -# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), -# headers={'Content-Type': r'application/json', -# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' -# r'headers="\(request-target\) \(created\) host date digest content-type",' -# r'signature="[a-zA-Z0-9+/=]+"', -# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, -# preload_content=True, timeout=None) -# -# pet_api.add_pet(self.pet) -# -# def test_valid_http_signature_with_defaults(self): -# privkey_path = self.rsa4096_key_path -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=privkey_path, -# private_key_passphrase=self.private_key_passphrase, -# ) -# config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 access_token to None. Here we are interested in testing -# # the HTTP signature scheme. -# config.access_token = None -# -# api_client = petstore_api.ApiClient(config) -# pet_api = PetApi(api_client) -# -# mock_pool = MockPoolManager(self) -# api_client.rest_client.pool_manager = mock_pool -# -# mock_pool.set_signing_config(signing_cfg) -# mock_pool.expect_request('POST', HOST + '/pet', -# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), -# headers={'Content-Type': r'application/json', -# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' -# r'headers="\(created\)",' -# r'signature="[a-zA-Z0-9+/=]+"', -# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, -# preload_content=True, timeout=None) -# -# pet_api.add_pet(self.pet) -# -# def test_valid_http_signature_rsassa_pkcs1v15(self): -# privkey_path = self.rsa4096_key_path -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=privkey_path, -# private_key_passphrase=self.private_key_passphrase, -# signing_algorithm=signing.ALGORITHM_RSASSA_PKCS1v15, -# signed_headers=[ -# signing.HEADER_REQUEST_TARGET, -# signing.HEADER_CREATED, -# ] -# ) -# config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 access_token to None. Here we are interested in testing -# # the HTTP signature scheme. -# config.access_token = None -# -# api_client = petstore_api.ApiClient(config) -# pet_api = PetApi(api_client) -# -# mock_pool = MockPoolManager(self) -# api_client.rest_client.pool_manager = mock_pool -# -# mock_pool.set_signing_config(signing_cfg) -# mock_pool.expect_request('POST', HOST + '/pet', -# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), -# headers={'Content-Type': r'application/json', -# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' -# r'headers="\(request-target\) \(created\)",' -# r'signature="[a-zA-Z0-9+/=]+"', -# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, -# preload_content=True, timeout=None) -# -# pet_api.add_pet(self.pet) -# -# def test_valid_http_signature_rsassa_pss(self): -# privkey_path = self.rsa4096_key_path -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=privkey_path, -# private_key_passphrase=self.private_key_passphrase, -# signing_algorithm=signing.ALGORITHM_RSASSA_PSS, -# signed_headers=[ -# signing.HEADER_REQUEST_TARGET, -# signing.HEADER_CREATED, -# ] -# ) -# config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 access_token to None. Here we are interested in testing -# # the HTTP signature scheme. -# config.access_token = None -# -# api_client = petstore_api.ApiClient(config) -# pet_api = PetApi(api_client) -# -# mock_pool = MockPoolManager(self) -# api_client.rest_client.pool_manager = mock_pool -# -# mock_pool.set_signing_config(signing_cfg) -# mock_pool.expect_request('POST', HOST + '/pet', -# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), -# headers={'Content-Type': r'application/json', -# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' -# r'headers="\(request-target\) \(created\)",' -# r'signature="[a-zA-Z0-9+/=]+"', -# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, -# preload_content=True, timeout=None) -# -# pet_api.add_pet(self.pet) -# -# def test_valid_http_signature_ec_p521(self): -# privkey_path = self.ec_p521_key_path -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=privkey_path, -# private_key_passphrase=self.private_key_passphrase, -# hash_algorithm=signing.HASH_SHA512, -# signed_headers=[ -# signing.HEADER_REQUEST_TARGET, -# signing.HEADER_CREATED, -# ] -# ) -# config = Configuration(host=HOST, signing_info=signing_cfg) -# # Set the OAuth2 access_token to None. Here we are interested in testing -# # the HTTP signature scheme. -# config.access_token = None -# -# api_client = petstore_api.ApiClient(config) -# pet_api = PetApi(api_client) -# -# mock_pool = MockPoolManager(self) -# api_client.rest_client.pool_manager = mock_pool -# -# mock_pool.set_signing_config(signing_cfg) -# mock_pool.expect_request('POST', HOST + '/pet', -# body=json.dumps(api_client.sanitize_for_serialization(self.pet)), -# headers={'Content-Type': r'application/json', -# 'Authorization': r'Signature keyId="my-key-id",algorithm="hs2019",created=[0-9]+,' -# r'headers="\(request-target\) \(created\)",' -# r'signature="[a-zA-Z0-9+/=]+"', -# 'User-Agent': r'OpenAPI-Generator/1.0.0/python'}, -# preload_content=True, timeout=None) -# -# pet_api.add_pet(self.pet) -# -# def test_invalid_configuration(self): -# # Signing scheme must be valid. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme='foo', -# private_key_path=self.ec_p521_key_path -# ) -# self.assertTrue(re.match('Unsupported security scheme', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # Signing scheme must be specified. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# private_key_path=self.ec_p521_key_path, -# signing_scheme=None -# ) -# self.assertTrue(re.match('Unsupported security scheme', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # Private key passphrase is missing but key is encrypted. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=self.ec_p521_key_path, -# ) -# self.assertTrue(re.match('Not a valid clear PKCS#8 structure', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # File containing private key must exist. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path='foobar', -# ) -# self.assertTrue(re.match('Private key file does not exist', str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # The max validity must be a positive value. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=self.ec_p521_key_path, -# signature_max_validity=timedelta(hours=-1) -# ) -# self.assertTrue(re.match('The signature max validity must be a positive value', -# str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # Cannot include the 'Authorization' header. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=self.ec_p521_key_path, -# signed_headers=['Authorization'] -# ) -# self.assertTrue(re.match("'Authorization' header cannot be included", str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# -# # Cannot specify duplicate headers. -# with self.assertRaises(Exception) as cm: -# signing_cfg = signing.HttpSigningConfiguration( -# key_id="my-key-id", -# signing_scheme=signing.SCHEME_HS2019, -# private_key_path=self.ec_p521_key_path, -# signed_headers=['Host', 'Date', 'Host'] -# ) -# self.assertTrue(re.match('Cannot have duplicates in the signed_headers parameter', -# str(cm.exception)), -# 'Exception message: {0}'.format(str(cm.exception))) -# diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python/tests_manual/test_integer_enum_one_value.py deleted file mode 100644 index a5d92cd0833..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_integer_enum_one_value.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.integer_enum_one_value import IntegerEnumOneValue - - -class TestIntegerEnumOneValue(unittest.TestCase): - """IntegerEnumOneValue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testIntegerEnumOneValue(self): - """Test IntegerEnumOneValue""" - - with self.assertRaises(TypeError): - """ - a value must be passed in - We cannot auto assign values because that would break composition if - received payloads included this with no inputs and we the 0 value to the data to the incoming payload - One is not allowed to mutate incoming payloads because then: - - order of composed schema ingestion matters - - one can have default value collisions - - the added data will make expected schemas not match payloads - """ - model = IntegerEnumOneValue() - - model = IntegerEnumOneValue(0) - assert model == 0, "We can also pass in the value as a positional arg" - - # one cannot pass the value with the value keyword - with self.assertRaises(TypeError): - model = IntegerEnumOneValue(value=0) - - # one can pass in the enum value - model = IntegerEnumOneValue(IntegerEnumOneValue.POSITIVE_0) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py b/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py deleted file mode 100644 index d6cbdfa3757..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_json_encoder.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -from datetime import date -import unittest - -import petstore_api -from petstore_api import schemas -from petstore_api import api_client - - -class TestJSONEncoder(unittest.TestCase): - """Fruit unit test stubs""" - serializer = api_client.JSONEncoder() - - def test_receive_encode_str_types(self): - schema_to_value = { - schemas.StrSchema: 'hi', - schemas.DateSchema: '2021-05-09', - schemas.DateTimeSchema: '2020-01-01T00:00:00' - } - for schema, value in schema_to_value.items(): - inst = schema.from_openapi_data_oapg(value) - assert value == self.serializer.default(inst) - - def test_receive_encode_numeric_types(self): - value_to_schema = { - 1: schemas.IntSchema, - 1.0: schemas.Float32Schema, - 3.14: schemas.Float32Schema, - 4: schemas.NumberSchema, - 4.0: schemas.NumberSchema, - 7.14: schemas.NumberSchema, - } - for value, schema in value_to_schema.items(): - inst = schema.from_openapi_data_oapg(value) - pre_serialize_value = self.serializer.default(inst) - assert value == pre_serialize_value and type(value) == type(pre_serialize_value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py b/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py deleted file mode 100644 index 975b02e0154..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_mammal.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.mammal import Mammal - - -class TestMammal(unittest.TestCase): - """Mammal unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testMammal(self): - """Test Mammal""" - - # tests that we can make a BasquePig by traveling through discriminator in Pig - m = Mammal(className="BasquePig") - from petstore_api.model import pig - from petstore_api.model import basque_pig - assert isinstance(m, Mammal) - assert isinstance(m, basque_pig.BasquePig) - assert isinstance(m, pig.Pig) - - # can make a Whale - m = Mammal(className="whale") - from petstore_api.model import whale - assert isinstance(m, whale.Whale) - - # can use the enum value - m = Mammal(className=whale.Whale.MetaOapg.properties.className.WHALE) - assert isinstance(m, whale.Whale) - - from petstore_api.model import zebra - m = Mammal(className='zebra') - assert isinstance(m, zebra.Zebra) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_money.py b/samples/openapi3/client/petstore/python/tests_manual/test_money.py deleted file mode 100644 index 060132ef40b..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_money.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -import decimal -import unittest - -from petstore_api.model.money import Money - - -class TestMoney(unittest.TestCase): - """Money unit test stubs""" - - def test_Money(self): - """Test Money""" - price = Money( - currency='usd', - amount='10.99' - ) - self.assertEqual(price.amount.as_decimal_oapg, decimal.Decimal('10.99')) - self.assertEqual( - price, - dict(currency='usd', amount='10.99') - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py deleted file mode 100644 index 723f32201bd..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_no_additional_properties.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal -import unittest - -from petstore_api.model.no_additional_properties import NoAdditionalProperties -from petstore_api import schemas - -class TestNoAdditionalProperties(unittest.TestCase): - """NoAdditionalProperties unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNoAdditionalProperties(self): - """Test NoAdditionalProperties""" - - # works with only required - inst = NoAdditionalProperties(id=1) - id_by_items = inst["id"] - assert id_by_items == 1 - assert isinstance(id_by_items, (schemas.Int64Schema, decimal.Decimal)) - id_by_property = inst.id - assert id_by_property == 1 - assert isinstance(id_by_property, (schemas.Int64Schema, decimal.Decimal)) - with self.assertRaises(AttributeError): - inst.petId - with self.assertRaises(KeyError): - inst["petId"] - assert inst.get_item_oapg("petId") is schemas.unset - - # works with required + optional - inst = NoAdditionalProperties(id=1, petId=2) - - # needs required - # TODO cast this to ApiTypeError? - with self.assertRaisesRegex( - TypeError, - r"missing 1 required keyword-only argument: 'id'" - ): - NoAdditionalProperties(petId=2) - - # may not be passed additional properties - # TODO cast this to ApiTypeError? - with self.assertRaisesRegex( - TypeError, - r"got an unexpected keyword argument 'invalidArg'" - ): - NoAdditionalProperties(id=2, invalidArg=2) - - # plural example - # TODO cast this to ApiTypeError? - with self.assertRaisesRegex( - TypeError, - r"got an unexpected keyword argument 'firstInvalidArg'" - ): - NoAdditionalProperties(id=2, firstInvalidArg=1, secondInvalidArg=1) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_nullable_string.py b/samples/openapi3/client/petstore/python/tests_manual/test_nullable_string.py deleted file mode 100644 index 2b2616fce95..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_nullable_string.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.nullable_string import NullableString -from petstore_api.schemas import Schema, Singleton - - -class TestNullableString(unittest.TestCase): - """NullableString unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNullableString(self): - """Test NullableString""" - inst = NullableString(None) - assert isinstance(inst, Singleton) - assert isinstance(inst, NullableString) - assert isinstance(inst, Schema) - assert inst.is_none_oapg() is True - assert repr(inst) == '' - - inst = NullableString('approved') - assert inst.is_none_oapg() is False - assert isinstance(inst, NullableString) - assert isinstance(inst, Schema) - assert isinstance(inst, str) - assert inst == 'approved' - - invalid_values = [1] - for invalid_value in invalid_values: - with self.assertRaisesRegex( - petstore_api.ApiTypeError, - r"Invalid type. Required value type is one of \[NoneClass, str\] and passed type was Decimal at \['args\[0\]'\]" - ): - NullableString(invalid_value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py deleted file mode 100644 index 5cf1dfaa9c5..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_number_with_validations.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.number_with_validations import NumberWithValidations - - -class TestNumberWithValidations(unittest.TestCase): - """NumberWithValidations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testNumberWithValidations(self): - """Test NumberWithValidations""" - valid_values = [10.0, 15.0, 20.0] - for valid_value in valid_values: - model = NumberWithValidations(valid_value) - assert model == valid_value - - value_error_msg_pairs = ( - (9.0, r"Invalid value `9.0`, must be a value greater than or equal to `10` at \('args\[0\]',\)"), - (21.0, r"Invalid value `21.0`, must be a value less than or equal to `20` at \('args\[0\]',\)"), - ) - for invalid_value, error_msg in value_error_msg_pairs: - with self.assertRaisesRegex(petstore_api.ApiValueError, error_msg): - NumberWithValidations(invalid_value) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py deleted file mode 100644 index 0814470225a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_arg_and_args_properties.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -from petstore_api import schemas, exceptions -from petstore_api.model.object_model_with_arg_and_args_properties import ObjectModelWithArgAndArgsProperties - - -class TestObjectModelWithArgAndArgsProperties(unittest.TestCase): - """ObjectModelWithArgAndArgsProperties unit test stubs""" - - def test_ObjectModelWithArgAndArgsProperties(self): - """Test ObjectModelWithArgAndArgsProperties""" - model = ObjectModelWithArgAndArgsProperties(arg='a', args='as') - self.assertTrue( - isinstance( - model["arg"], - ObjectModelWithArgAndArgsProperties.MetaOapg.properties.arg - ) - ) - self.assertTrue( - isinstance( - model["args"], - ObjectModelWithArgAndArgsProperties.MetaOapg.properties.args - ) - ) - self.assertTrue(isinstance(model["arg"], schemas.StrSchema)) - self.assertTrue(isinstance(model["args"], schemas.StrSchema)) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py deleted file mode 100644 index 42fc674cd2d..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_model_with_ref_props.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import frozendict - -from petstore_api.schemas import BoolClass -from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps -from petstore_api.model.number_with_validations import NumberWithValidations - - -class TestObjectModelWithRefProps(unittest.TestCase): - """ObjectModelWithRefProps unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testObjectModelWithRefProps(self): - """Test ObjectModelWithRefProps""" - inst = ObjectModelWithRefProps(myNumber=15.0, myString="a", myBoolean=True) - assert isinstance(inst, ObjectModelWithRefProps) - assert isinstance(inst, frozendict.frozendict) - assert set(inst.keys()) == {"myNumber", "myString", "myBoolean"} - assert inst["myNumber"] == 15.0 - assert isinstance(inst["myNumber"], NumberWithValidations) - assert inst["myString"] == 'a' - assert isinstance(inst["myString"], ObjectModelWithRefProps.MetaOapg.properties.myString) - assert bool(inst["myBoolean"]) is True - assert isinstance(inst["myBoolean"], ObjectModelWithRefProps.MetaOapg.properties.myBoolean) - assert isinstance(inst["myBoolean"], BoolClass) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py deleted file mode 100644 index 7f530f25f0b..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_all_of_with_req_test_prop_from_unset_add_prop.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_all_of_with_req_test_prop_from_unset_add_prop import ObjectWithAllOfWithReqTestPropFromUnsetAddProp -from petstore_api import configuration - - -class TestObjectWithAllOfWithReqTestPropFromUnsetAddProp(unittest.TestCase): - """ObjectWithAllOfWithReqTestPropFromUnsetAddProp unit test stubs""" - - def test_model_instantiation(self): - inst = ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - test='a' - ) - assert inst == {'test': 'a'} - - # without the required test property an exception is thrown - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithAllOfWithReqTestPropFromUnsetAddProp( - name='a' - ) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py deleted file mode 100644 index 386304ecc67..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_difficultly_named_props.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps - - -class TestObjectWithDifficultlyNamedProps(unittest.TestCase): - """ObjectWithDifficultlyNamedProps unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ObjectWithDifficultlyNamedProps(self): - """Test ObjectWithDifficultlyNamedProps""" - # FIXME: construct object with mandatory attributes with example values - # model = ObjectWithDifficultlyNamedProps() # noqa: E501 - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py deleted file mode 100644 index 8105e51eab2..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_inline_composition_property.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -from petstore_api import schemas, exceptions -from petstore_api.model.object_with_inline_composition_property import ObjectWithInlineCompositionProperty - - -class TestObjectWithInlineCompositionProperty(unittest.TestCase): - """ObjectWithInlineCompositionProperty unit test stubs""" - - def test_ObjectWithInlineCompositionProperty(self): - """Test ObjectWithInlineCompositionProperty""" - model = ObjectWithInlineCompositionProperty(someProp='a') - self.assertTrue( - isinstance( - model["someProp"], - ObjectWithInlineCompositionProperty.MetaOapg.properties.someProp - ) - ) - self.assertTrue(isinstance(model["someProp"], schemas.StrSchema)) - - # error thrown on length < 1 - with self.assertRaises(exceptions.ApiValueError): - ObjectWithInlineCompositionProperty(someProp='') - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py deleted file mode 100644 index fb8cf4a9885..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_invalid_named_refed_properties.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -import petstore_api -from petstore_api.model.object_with_invalid_named_refed_properties import ObjectWithInvalidNamedRefedProperties -from petstore_api.model.array_with_validations_in_items import ArrayWithValidationsInItems -from petstore_api.model.from_schema import FromSchema - - -class TestObjectWithInvalidNamedRefedProperties(unittest.TestCase): - """ObjectWithInvalidNamedRefedProperties unit test stubs""" - - def test_instantiation_success(self): - array_value = ArrayWithValidationsInItems( - [4, 5] - ) - from_value = FromSchema(data='abc', id=1) - kwargs = { - 'from': from_value, - '!reference': array_value - } - # __new__ creation works - inst = ObjectWithInvalidNamedRefedProperties( - **kwargs - ) - primitive_data = { - 'from': {'data': 'abc', 'id': 1}, - '!reference': (4, 5) - } - assert inst == primitive_data - # from_openapi_data_oapg works - inst = ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg(primitive_data) - assert inst == primitive_data - - def test_omitting_required_properties_fails(self): - array_value = ArrayWithValidationsInItems( - [4, 5] - ) - from_value = FromSchema(data='abc', id=1) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties( - **{ - 'from': from_value, - } - ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties( - **{ - '!reference': array_value - } - ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg( - { - 'from': {'data': 'abc', 'id': 1}, - } - ) - with self.assertRaises(petstore_api.exceptions.ApiTypeError): - ObjectWithInvalidNamedRefedProperties.from_openapi_data_oapg( - { - '!reference': [4, 5] - } - ) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py b/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py deleted file mode 100644 index 3a443dfa39a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_object_with_validations.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.object_with_validations import ObjectWithValidations - - -class TestObjectWithValidations(unittest.TestCase): - """ObjectWithValidations unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_ObjectWithValidations(self): - """Test ObjectWithValidations""" - - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Invalid value `frozendict.frozendict\({}\)`, number of properties must be greater than or equal to `2` at \('args\[0\]',\)" - ): - ObjectWithValidations({}) - - - with self.assertRaisesRegex( - petstore_api.ApiValueError, - r"Invalid value `frozendict.frozendict\({'a': 'a'}\)`, number of properties must be greater than or equal to `2` at \('args\[0\]',\)" - ): - # number of properties less than 2 fails - model = ObjectWithValidations(a='a') - - # 2 or more properties succeeds - model = ObjectWithValidations(a='a', b='b') - model = ObjectWithValidations(a='a', b='b', c='c') - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py b/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py deleted file mode 100644 index 75ece111b8c..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_parameters.py +++ /dev/null @@ -1,1063 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -import unittest -import collections - -from petstore_api import api_client, exceptions, schemas - -from . import ParamTestCase - - -class TestParameter(unittest.TestCase): - in_type_to_parameter_cls = { - api_client.ParameterInType.PATH: api_client.PathParameter, - api_client.ParameterInType.QUERY: api_client.QueryParameter, - api_client.ParameterInType.COOKIE: api_client.CookieParameter, - api_client.ParameterInType.HEADER: api_client.HeaderParameter, - } - - invalid_inputs = ( - True, - False - ) - - def test_throws_exception_when_schema_and_content_omitted(self): - with self.assertRaises(ValueError): - api_client.QueryParameter( - name='' - ) - - def test_throws_exception_when_schema_and_content_input(self): - with self.assertRaises(ValueError): - schema = schemas.StrSchema - api_client.QueryParameter( - name='', - schema=schema, - content={'application/json': schema} - ) - - def test_succeeds_when_schema_or_content_input(self): - schema = schemas.StrSchema - api_client.QueryParameter( - name='', - schema=schema, - ) - api_client.QueryParameter( - name='', - content={'application/json': schema} - ) - - def test_succeeds_and_fails_for_style_and_in_type_combos(self): - style_to_in_type = { - api_client.ParameterStyle.MATRIX: {api_client.ParameterInType.PATH}, - api_client.ParameterStyle.LABEL: {api_client.ParameterInType.PATH}, - api_client.ParameterStyle.FORM: {api_client.ParameterInType.QUERY, api_client.ParameterInType.COOKIE}, - api_client.ParameterStyle.SIMPLE: {api_client.ParameterInType.PATH, api_client.ParameterInType.HEADER}, - api_client.ParameterStyle.SPACE_DELIMITED: {api_client.ParameterInType.QUERY}, - api_client.ParameterStyle.PIPE_DELIMITED: {api_client.ParameterInType.QUERY}, - api_client.ParameterStyle.DEEP_OBJECT: {api_client.ParameterInType.QUERY}, - } - schema = schemas.StrSchema - for style in style_to_in_type: - valid_in_types = style_to_in_type[style] - for valid_in_type in valid_in_types: - parameter_cls = self.in_type_to_parameter_cls[valid_in_type] - parameter_cls( - name='', - style=style, - schema=schema, - ) - invalid_in_types = {in_t for in_t in api_client.ParameterInType if in_t not in valid_in_types} - for invalid_in_type in invalid_in_types: - parameter_cls = self.in_type_to_parameter_cls[invalid_in_type] - with self.assertRaises(ValueError): - parameter_cls( - name='', - style=style, - schema=schema, - ) - - def test_throws_exception_when_invalid_name_input(self): - disallowed_names = {'Accept', 'Content-Type', 'Authorization'} - for disallowed_name in disallowed_names: - with self.assertRaises(ValueError): - api_client.HeaderParameter( - name=disallowed_name, - schema=schemas.StrSchema, - ) - - def test_query_style_form_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='?color=1') - ), - ParamTestCase( - 3.14, - dict(color='?color=3.14') - ), - ParamTestCase( - 'blue', - dict(color='?color=blue') - ), - ParamTestCase( - 'hello world', - dict(color='?color=hello%20world') - ), - ParamTestCase( - '', - dict(color='?color=') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='?color=blue,black,brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='?color=blue&color=black&color=brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='?color=R,100,G,200,B,150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='?R=100&G=200&B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.FORM, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.FORM, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_cookie_style_form_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='color=1') - ), - ParamTestCase( - 3.14, - dict(color='color=3.14') - ), - ParamTestCase( - 'blue', - dict(color='color=blue') - ), - ParamTestCase( - 'hello world', - dict(color='color=hello world') - ), - ParamTestCase( - '', - dict(color='color=') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='color=blue,black,brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='color=blue&color=black&color=brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='color=R,100,G,200,B,150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R=100&G=200&B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.CookieParameter( - name=name, - style=api_client.ParameterStyle.FORM, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.CookieParameter( - name=name, - style=api_client.ParameterStyle.FORM, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_simple_in_path_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello%20world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R,100,G,200,B,150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R=100,G=200,B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.SIMPLE, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.SIMPLE, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_simple_in_header_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R,100,G,200,B,150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R=100,G=200,B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.HeaderParameter( - name=name, - style=api_client.ParameterStyle.SIMPLE, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.HeaderParameter( - name=name, - style=api_client.ParameterStyle.SIMPLE, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_label_in_path_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='.1') - ), - ParamTestCase( - 3.14, - dict(color='.3.14') - ), - ParamTestCase( - 'blue', - dict(color='.blue') - ), - ParamTestCase( - 'hello world', - dict(color='.hello%20world') - ), - ParamTestCase( - '', - dict(color='.') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='.blue.black.brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='.blue.black.brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='.R.100.G.200.B.150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='.R=100.G=200.B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.LABEL, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.LABEL, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_matrix_in_path_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color=';color=1') - ), - ParamTestCase( - 3.14, - dict(color=';color=3.14') - ), - ParamTestCase( - 'blue', - dict(color=';color=blue') - ), - ParamTestCase( - 'hello world', - dict(color=';color=hello%20world') - ), - ParamTestCase( - '', - dict(color=';color') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color=';color=blue,black,brown') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color=';color=blue;color=black;color=brown'), - explode=True - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color=';color=R,100,G,200,B,150') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color=';R=100;G=200;B=150'), - explode=True - ), - ) - for test_case in test_cases: - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.MATRIX, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.PathParameter( - name=name, - style=api_client.ParameterStyle.MATRIX, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_space_delimited_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello%20world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue%20black%20brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R%20100%20G%20200%20B%20150') - ), - ) - for test_case in test_cases: - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.SPACE_DELIMITED, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_style_pipe_delimited_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello%20world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue|black|brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R|100|G|200|B|150') - ), - ) - for test_case in test_cases: - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.PIPE_DELIMITED, - schema=schemas.AnyTypeSchema, - explode=test_case.explode, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - for explode in (True, False): - parameter = api_client.QueryParameter( - name=name, - style=api_client.ParameterStyle.PIPE_DELIMITED, - schema=schemas.AnyTypeSchema, - explode=explode, - ) - parameter.serialize(invalid_input) - - def test_path_params_no_style(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello%20world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R,100,G,200,B,150') - ), - ) - for test_case in test_cases: - parameter = api_client.PathParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - parameter = api_client.PathParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - parameter.serialize(invalid_input) - - def test_header_params_no_style(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='1') - ), - ParamTestCase( - 3.14, - dict(color='3.14') - ), - ParamTestCase( - 'blue', - dict(color='blue') - ), - ParamTestCase( - 'hello world', - dict(color='hello world') - ), - ParamTestCase( - '', - dict(color='') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='blue,black,brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R,100,G,200,B,150') - ), - ) - for test_case in test_cases: - parameter = api_client.HeaderParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - parameter = api_client.HeaderParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - parameter.serialize(invalid_input) - - def test_query_params_no_style(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='?color=1') - ), - ParamTestCase( - 3.14, - dict(color='?color=3.14') - ), - ParamTestCase( - 'blue', - dict(color='?color=blue') - ), - ParamTestCase( - 'hello world', - dict(color='?color=hello%20world') - ), - ParamTestCase( - '', - dict(color='?color=') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='?color=blue&color=black&color=brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='?R=100&G=200&B=150') - ), - ) - for test_case in test_cases: - parameter = api_client.QueryParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - parameter = api_client.QueryParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - parameter.serialize(invalid_input) - - def test_cookie_params_no_style(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - dict(color='') - ), - ParamTestCase( - 1, - dict(color='color=1') - ), - ParamTestCase( - 3.14, - dict(color='color=3.14') - ), - ParamTestCase( - 'blue', - dict(color='color=blue') - ), - ParamTestCase( - 'hello world', - dict(color='color=hello world') - ), - ParamTestCase( - '', - dict(color='color=') - ), - ParamTestCase( - [], - dict(color='') - ), - ParamTestCase( - ['blue', 'black', 'brown'], - dict(color='color=blue&color=black&color=brown') - ), - ParamTestCase( - {}, - dict(color='') - ), - ParamTestCase( - dict(R=100, G=200, B=150), - dict(color='R=100&G=200&B=150') - ), - ) - for test_case in test_cases: - parameter = api_client.CookieParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - with self.assertRaises(exceptions.ApiValueError): - for invalid_input in self.invalid_inputs: - parameter = api_client.CookieParameter( - name=name, - schema=schemas.AnyTypeSchema, - ) - parameter.serialize(invalid_input) - - def test_checks_content_lengths(self): - with self.assertRaises(ValueError): - api_client.QueryParameter( - name='', content={} - ) - with self.assertRaises(ValueError): - api_client.QueryParameter( - name='', - content={'application/json': schemas.AnyTypeSchema, 'text/plain': schemas.AnyTypeSchema} - ) - # valid length works - api_client.QueryParameter( - name='', - content={'application/json': schemas.AnyTypeSchema} - ) - - def test_header_content_json_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - {'color': 'null'} - ), - ParamTestCase( - 1, - {'color': '1'} - ), - ParamTestCase( - 3.14, - {'color': '3.14'} - ), - ParamTestCase( - 'blue', - {'color': '"blue"'} - ), - ParamTestCase( - 'hello world', - {'color': '"hello world"'} - ), - ParamTestCase( - '', - {'color': '""'} - ), - ParamTestCase( - True, - {'color': 'true'} - ), - ParamTestCase( - False, - {'color': 'false'} - ), - ParamTestCase( - [], - {'color': '[]'} - ), - ParamTestCase( - ['blue', 'black', 'brown'], - {'color': '["blue", "black", "brown"]'} - ), - ParamTestCase( - {}, - {'color': '{}'} - ), - ParamTestCase( - dict(R=100, G=200, B=150), - {'color': '{"R": 100, "G": 200, "B": 150}'} - ), - ) - for test_case in test_cases: - parameter = api_client.HeaderParameter( - name=name, - content={'application/json': schemas.AnyTypeSchema} - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - def test_query_content_json_serialization(self): - name = 'color' - test_cases = ( - ParamTestCase( - None, - {'color': '?color=null'} - ), - ParamTestCase( - 1, - {'color': '?color=1'} - ), - ParamTestCase( - 3.14, - {'color': '?color=3.14'} - ), - ParamTestCase( - 'blue', - {'color': '?color=%22blue%22'} - ), - ParamTestCase( - 'hello world', - {'color': '?color=%22hello%20world%22'} - ), - ParamTestCase( - '', - {'color': '?color=%22%22'} - ), - ParamTestCase( - True, - {'color': '?color=true'} - ), - ParamTestCase( - False, - {'color': '?color=false'} - ), - ParamTestCase( - [], - {'color': '?color=%5B%5D'} - ), - ParamTestCase( - ['blue', 'black', 'brown'], - {'color': '?color=%5B%22blue%22%2C%22black%22%2C%22brown%22%5D'} - ), - ParamTestCase( - {}, - {'color': '?color=%7B%7D'} - ), - ParamTestCase( - dict(R=100, G=200, B=150), - {'color': '?color=%7B%22R%22%3A100%2C%22G%22%3A200%2C%22B%22%3A150%7D'} - ), - ) - for test_case in test_cases: - parameter = api_client.QueryParameter( - name=name, - content={'application/json': schemas.AnyTypeSchema} - ) - serialization = parameter.serialize(test_case.payload) - self.assertEqual(serialization, test_case.expected_serialization) - - def test_throws_error_for_unimplemented_serialization(self): - with self.assertRaises(NotImplementedError): - parameter = api_client.HeaderParameter( - name='color', - content={'text/plain': schemas.AnyTypeSchema} - ) - parameter.serialize(None) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py b/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py deleted file mode 100644 index 171310075ab..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_parent_pet.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model.grandparent_animal import GrandparentAnimal -from petstore_api.model.parent_pet import ParentPet - - -class TestParentPet(unittest.TestCase): - """ParentPet unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testParentPet(self): - """Test ParentPet""" - - # test that we can make a ParentPet from a ParentPet - # which requires that we travel back through ParentPet's allOf descendant - # GrandparentAnimal, and we use the descendant's discriminator to make ParentPet - model = ParentPet(pet_type="ParentPet") - assert isinstance(model, ParentPet) - assert isinstance(model, GrandparentAnimal) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py deleted file mode 100644 index b7ee545c300..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake/test_get.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from ... import ApiTestMixin - - -class TestFake(ApiTestMixin, unittest.TestCase): - """ - Fake unit test stubs - To test enum parameters # noqa: E501 - """ - used_api_client = api_client.ApiClient( - header_name='enum_header_string', - header_value='_abc' - ) - - @patch.object(urllib3.PoolManager, 'request') - def test_passed_in_header_overrides_default(self, mock_request): - mock_request.return_value = self.response(b'') - - api = get.ApiForget(api_client=self.used_api_client) - api_response = api.get(header_params={'enum_header_string': '-efg'}) - self.assert_pool_manager_request_called_with( - mock_request, - f'http://petstore.swagger.io:80/v2/fake', - body=None, - method='GET', - content_type=None, - accept_content_type='application/json', - headers={'enum_header_string': '-efg'} - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - @patch.object(urllib3.PoolManager, 'request') - def test_default_header_used_when_no_header_params_input(self, mock_request): - mock_request.return_value = self.response(b'') - - api = get.ApiForget(api_client=self.used_api_client) - api_response = api.get() - self.assert_pool_manager_request_called_with( - mock_request, - f'http://petstore.swagger.io:80/v2/fake', - body=None, - method='GET', - content_type=None, - accept_content_type='application/json', - headers={'enum_header_string': '_abc'} - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - @patch.object(urllib3.PoolManager, 'request') - def test_response_exception_info(self, mock_request): - error_dict = { - 'msg': 'record not found' - } - response_body_bytes = self.json_bytes(error_dict) - mock_request.return_value = self.response(response_body_bytes, status=404, reason='404') - - api = get.ApiForget() - with self.assertRaises(petstore_api.ApiException) as cm: - api_response = api.get() - - exc: petstore_api.ApiException[get.ApiResponseFor404] = cm.exception - expected_status = 404 - expected_reason = '404' - self.assertEqual(exc.status, expected_status) - self.assertEqual(exc.reason, expected_reason) - self.assertEqual(exc.body, response_body_bytes) - expected_headers = {'content-type': 'application/json'} - self.assertEqual(exc.headers, expected_headers) - self.assertEqual(exc.api_response.response.status, expected_status) - self.assertEqual(exc.api_response.response.reason, expected_reason) - self.assertEqual(exc.api_response.response.data, response_body_bytes) - self.assertEqual(exc.api_response.response.headers, expected_headers) - self.assertTrue(isinstance(exc.api_response.body, schemas.DictSchema)) - self.assertEqual(exc.api_response.body, error_dict) - - self.assert_pool_manager_request_called_with( - mock_request, - f'http://petstore.swagger.io:80/v2/fake', - body=None, - method='GET', - content_type=None, - accept_content_type='application/json', - ) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py deleted file mode 100644 index 025a4eb2a8f..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_fake_query_param_with_json_content_type/test_get.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import collections -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.fake_query_param_with_json_content_type import get # noqa: E501 -from petstore_api import configuration, schemas, api_client - -from ... import ApiTestMixin, ParamTestCase - - -class TestFakeQueryParamWithJsonContentType(ApiTestMixin, unittest.TestCase): - """ - FakeQueryParamWithJsonContentType unit test stubs - query param with json content-type # noqa: E501 - """ - @patch.object(urllib3.PoolManager, 'request') - def test_get(self, mock_request): - used_api_client = api_client.ApiClient() - api = get.ApiForget(api_client=used_api_client) - - response_json = {} - body = self.json_bytes(response_json) - mock_request.return_value = self.response(body) - - test_cases = ( - ParamTestCase( - None, - 'null' - ), - ParamTestCase( - 1, - '1' - ), - ParamTestCase( - 3.14, - '3.14' - ), - ParamTestCase( - 'blue', - '%22blue%22' - ), - ParamTestCase( - 'hello world', - '%22hello%20world%22' - ), - ParamTestCase( - '', - '%22%22' - ), - ParamTestCase( - True, - 'true' - ), - ParamTestCase( - False, - 'false' - ), - ParamTestCase( - [], - '%5B%5D' - ), - ParamTestCase( - ['blue', 'black', 'brown'], - '%5B%22blue%22%2C%22black%22%2C%22brown%22%5D' - ), - ParamTestCase( - {}, - '%7B%7D' - ), - ParamTestCase( - dict(R=100, G=200, B=150), - '%7B%22R%22%3A100%2C%22G%22%3A200%2C%22B%22%3A150%7D' - ), - ) - - for test_case in test_cases: - api_response = api.get(query_params={'someParam': test_case.payload}) - self.assert_pool_manager_request_called_with( - mock_request, - f'http://petstore.swagger.io:80/v2/fake/queryParamWithJsonContentType?someParam={test_case.expected_serialization}', - body=None, - method='GET', - content_type=None, - accept_content_type='application/json', - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.AnyTypeSchema) - assert isinstance(api_response.body, schemas.frozendict.frozendict) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py deleted file mode 100644 index 81cb92cd133..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_get.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import json -import unittest -from unittest.mock import patch - -import urllib3 - -from petstore_api.paths.pet_pet_id import get # noqa: E501 -from petstore_api import configuration, schemas, api_client -from petstore_api.model.pet import Pet - -from ... import ApiTestMixin - - -class TestPetPetId(ApiTestMixin, unittest.TestCase): - """ - PetPetId unit test stubs - Find pet by ID # noqa: E501 - """ - def test_get(self): - config_with_auth = configuration.Configuration(api_key={'api_key': 'someKey'}) - used_api_client = api_client.ApiClient(configuration=config_with_auth) - api = get.ApiForget(api_client=used_api_client) - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - response_json = { - 'photoUrls': [], - 'name': 'Kitty', - 'id': 1, - 'category': { - 'name': 'Cat', - 'id': 1 - }, - 'tags': [], - 'status': 'available' - } - body = self.json_bytes(response_json) - mock_request.return_value = self.response(body) - - api_response = api.get(path_params={'petId': 1}) - self.assert_pool_manager_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/pet/1', - body=None, - method='GET', - content_type=None, - accept_content_type='application/xml, application/json', - headers={'api_key': 'someKey'} - ) - - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, Pet) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_post.py b/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_post.py deleted file mode 100644 index 2a18e055ee0..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_paths/test_pet_pet_id/test_post.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -import unittest -from unittest.mock import patch - -import urllib3 - -import petstore_api -from petstore_api.paths.pet_pet_id import post -from petstore_api import configuration, schemas, api_client - -from ... import ApiTestMixin - - -class TestPetPetId(ApiTestMixin, unittest.TestCase): - """ - PetPetId unit test stubs - Updates a pet in the store with form data # noqa: E501 - """ - - def test_post(self): - used_api_client = api_client.ApiClient() - api = post.ApiForpost(api_client=used_api_client) - - with patch.object(urllib3.PoolManager, 'request') as mock_request: - path_params = {'petId': 2345} - body = { - 'name': 'mister furball award', - 'status': 'happy, fuzzy, and bouncy' - } - mock_request.return_value = self.response("") - - api_response = api.post(path_params=path_params, body=body) - mock_request.assert_called_with( - 'POST', - 'http://petstore.swagger.io:80/v2/pet/2345', - body='name=mister%20furball%20award&status=happy%2C%20fuzzy%2C%20and%20bouncy', - fields={}, - encode_multipart=False, - preload_content=True, - timeout=None, - headers={ - 'User-Agent': self.user_agent, - 'Content-Type': 'application/x-www-form-urlencoded' - } - ) - assert isinstance(api_response.response, urllib3.HTTPResponse) - assert isinstance(api_response.body, schemas.Unset) - assert isinstance(api_response.headers, schemas.Unset) - assert api_response.response.status == 200 - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_pet.py b/samples/openapi3/client/petstore/python/tests_manual/test_pet.py deleted file mode 100644 index be64bfa6e3c..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_pet.py +++ /dev/null @@ -1,37 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import decimal -import unittest - -from petstore_api.model import pet -from petstore_api.model import category - - -class TesttPet(unittest.TestCase): - """ParentPet unit test stubs""" - - def testPet(self): - cat = category.Category(name='hi', addprop={'a': 1}) - inst = pet.Pet(photoUrls=[], name='Katsu', category=cat) - self.assertEqual( - inst, - { - 'photoUrls': (), - 'name': 'Katsu', - 'category': { - 'name': 'hi', - 'addprop': {'a': decimal.Decimal('1')} - } - } - ) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py b/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py deleted file mode 100644 index dff97bc716a..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_quadrilateral.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.model import complex_quadrilateral -from petstore_api.model import simple_quadrilateral -from petstore_api.model.quadrilateral import Quadrilateral - - -class TestQuadrilateral(unittest.TestCase): - """Quadrilateral unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testQuadrilateral(self): - """Test Quadrilateral""" - instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="ComplexQuadrilateral") - assert isinstance(instance, complex_quadrilateral.ComplexQuadrilateral) - instance = Quadrilateral(shapeType="Quadrilateral", quadrilateralType="SimpleQuadrilateral") - assert isinstance(instance, simple_quadrilateral.SimpleQuadrilateral) - - -if __name__ == '__main__': - unittest.main() 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 deleted file mode 100644 index 6cfe190cfd3..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_request_body.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import collections -import json -import unittest - -from petstore_api import api_client, exceptions, schemas - -ParamTestCase = collections.namedtuple('ParamTestCase', 'payload expected_serialization') - - -class TestParameter(unittest.TestCase): - - def test_throws_exception_when_content_is_invalid_size(self): - with self.assertRaises(ValueError): - api_client.RequestBody( - content={} - ) - - def test_content_json_serialization(self): - payloads = [ - None, - 1, - 3.14, - 'blue', - 'hello world', - '', - True, - False, - [], - ['blue', 'black', 'brown'], - {}, - dict(R=100, G=200, B=150), - ] - for payload in payloads: - request_body = api_client.RequestBody( - content={'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema)} - ) - serialization = request_body.serialize(payload, 'application/json') - self.assertEqual( - serialization, - dict(body=json.dumps(payload, separators=(",", ":"), ensure_ascii=False).encode('utf-8')) - ) - - def test_content_multipart_form_data_serialization(self): - payload = dict( - some_null=None, - some_bool=True, - some_str='a', - some_int=1, - some_float=3.14, - some_list=[], - some_dict={}, - some_bytes=b'abc' - ) - request_body = api_client.RequestBody( - content={'multipart/form-data': api_client.MediaType(schema=schemas.AnyTypeSchema)} - ) - serialization = request_body.serialize(payload, 'multipart/form-data') - self.assertEqual( - serialization, - dict( - fields=( - api_client.RequestField( - name='some_null', data='null', headers={ - 'Content-Type': 'application/json', - "Content-Disposition": "form-data; name=\"some_null\"", - "Content-Location": None - }), - api_client.RequestField( - name='some_bool', data='true', headers={ - 'Content-Type': 'application/json', - "Content-Disposition": "form-data; name=\"some_bool\"", - "Content-Location": None - }), - api_client.RequestField( - name='some_str', data='a', headers={ - 'Content-Type': 'text/plain', - "Content-Disposition": "form-data; name=\"some_str\"", - "Content-Location": None - }), - api_client.RequestField( - name='some_int', data='1', headers={ - 'Content-Type': 'application/json', - "Content-Disposition": "form-data; name=\"some_int\"", - "Content-Location": None - }), - api_client.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( - name='some_list', data='[]', headers={ - 'Content-Type': 'application/json', - "Content-Disposition": "form-data; name=\"some_list\"", - "Content-Location": None - }), - api_client.RequestField( - name='some_dict', data='{}', headers={ - 'Content-Type': 'application/json', - "Content-Disposition": "form-data; name=\"some_dict\"", - "Content-Location": None - }), - api_client.RequestField( - name='some_bytes', data=b'abc', headers={ - 'Content-Type': 'application/octet-stream', - "Content-Disposition": "form-data; name=\"some_bytes\"", - "Content-Location": None - }) - ) - ) - ) - - def test_throws_error_for_nonexistent_content_type(self): - request_body = api_client.RequestBody( - content={'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema)} - ) - with self.assertRaises(KeyError): - request_body.serialize(None, 'abc/def') - - def test_throws_error_for_not_implemented_content_type(self): - request_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType(schema=schemas.AnyTypeSchema), - 'text/css': api_client.MediaType(schema=schemas.AnyTypeSchema) - } - ) - with self.assertRaises(NotImplementedError): - request_body.serialize(None, 'text/css') - - def test_application_x_www_form_urlencoded_serialization(self): - payload = dict( - some_null=None, - some_str='hi there', - some_int=1, - some_float=3.14, - some_list=[], - some_dict={}, - ) - content_type = 'application/x-www-form-urlencoded' - request_body = api_client.RequestBody( - content={content_type: api_client.MediaType(schema=schemas.AnyTypeSchema)} - ) - serialization = request_body.serialize(payload, content_type) - self.assertEqual( - serialization, - dict(body='some_str=hi%20there&some_int=1&some_float=3.14') - ) - - serialization = request_body.serialize({}, content_type) - self.assertEqual( - serialization, - dict(body='') - ) - - invalid_payloads = [ - dict(some_bool=True), - dict(some_bytes=b'abc'), - dict(some_list_with_data=[0]), - dict(some_dict_with_data={'a': 'b'}), - ] - for invalid_payload in invalid_payloads: - with self.assertRaises(exceptions.ApiValueError): - request_body.serialize(invalid_payload, content_type) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_shape.py b/samples/openapi3/client/petstore/python/tests_manual/test_shape.py deleted file mode 100644 index 80bab5b805b..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_shape.py +++ /dev/null @@ -1,118 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import frozendict - -import petstore_api -from petstore_api.schemas import Singleton -from petstore_api.model.shape import Shape -from petstore_api.model import complex_quadrilateral -from petstore_api.model import simple_quadrilateral -from petstore_api.model import triangle -from petstore_api.model import triangle_interface -from petstore_api.model import equilateral_triangle -from petstore_api.model import isosceles_triangle -from petstore_api.model import scalene_triangle - - -class TestShape(unittest.TestCase): - """Shape unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_recursionlimit(self): - """Test case for recursionlimit - - """ - assert sys.getrecursionlimit() == 1234 - - def testShape(self): - """Test Shape""" - - tri = Shape( - shapeType="Triangle", - triangleType="EquilateralTriangle" - ) - assert isinstance(tri, equilateral_triangle.EquilateralTriangle) - assert isinstance(tri, triangle.Triangle) - assert isinstance(tri, triangle_interface.TriangleInterface) - assert isinstance(tri, Shape) - assert isinstance(tri, frozendict.frozendict) - assert isinstance(tri.shapeType, str) - assert isinstance(tri.shapeType, Singleton) - - tri = Shape( - shapeType="Triangle", - triangleType="IsoscelesTriangle" - ) - assert isinstance(tri, isosceles_triangle.IsoscelesTriangle) - - tri = Shape( - shapeType="Triangle", - triangleType="ScaleneTriangle" - ) - assert isinstance(tri, scalene_triangle.ScaleneTriangle) - - quad = Shape( - shapeType="Quadrilateral", - quadrilateralType="ComplexQuadrilateral" - ) - assert isinstance(quad, complex_quadrilateral.ComplexQuadrilateral) - - quad = Shape( - shapeType="Quadrilateral", - quadrilateralType="SimpleQuadrilateral" - ) - assert isinstance(quad, simple_quadrilateral.SimpleQuadrilateral) - - # data missing - with self.assertRaisesRegex( - petstore_api.exceptions.ApiValueError, - r"Cannot deserialize input data due to missing discriminator. The discriminator " - r"property 'shapeType' is missing at path: \('args\[0\]',\)" - ): - Shape({}) - - # invalid shape_type (first discriminator). 'Circle' does not exist in the model. - err_msg = ( - r"Invalid discriminator value was passed in to Shape.shapeType Only the values " - r"\['Quadrilateral', 'Triangle'\] are allowed at \('args\[0\]', 'shapeType'\)" - ) - with self.assertRaisesRegex( - petstore_api.ApiValueError, - err_msg - ): - Shape(shapeType="Circle") - - # invalid quadrilateral_type (second discriminator) - err_msg = ( - r"Invalid discriminator value was passed in to Quadrilateral.quadrilateralType Only the values " - r"\['ComplexQuadrilateral', 'SimpleQuadrilateral'\] are allowed at \('args\[0\]', 'quadrilateralType'\)" - ) - with self.assertRaisesRegex( - petstore_api.ApiValueError, - err_msg - ): - Shape( - shapeType="Quadrilateral", - quadrilateralType="Triangle" - ) - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_string_enum.py b/samples/openapi3/client/petstore/python/tests_manual/test_string_enum.py deleted file mode 100644 index 0485242b37e..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_string_enum.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import petstore_api -from petstore_api.model.string_enum import StringEnum -from petstore_api.schemas import Singleton, NoneClass - - -class TestStringEnum(unittest.TestCase): - """StringEnum unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testStringEnum(self): - """Test StringEnum""" - inst = StringEnum(None) - assert isinstance(inst, StringEnum) - assert isinstance(inst, NoneClass) - assert repr(inst) == '' - - inst = StringEnum('approved') - assert isinstance(inst, StringEnum) - assert isinstance(inst, Singleton) - assert isinstance(inst, str) - assert inst == 'approved' - assert repr(inst) == "" - - with self.assertRaises(petstore_api.ApiValueError): - StringEnum('garbage') - - # make sure that we can access its allowed_values - assert isinstance(StringEnum.NONE, NoneClass) - assert StringEnum.PLACED == 'placed' - assert StringEnum.APPROVED == 'approved' - assert StringEnum.DELIVERED == 'delivered' - assert StringEnum.DOUBLE_QUOTE_WITH_NEWLINE == "double quote \n with newline" - assert StringEnum.MULTIPLE_LINES == "multiple\nlines" - assert StringEnum.SINGLE_QUOTED == "single quoted" - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py b/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py deleted file mode 100644 index 3d19a8d65fa..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_triangle.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import unittest - -import frozendict - -from petstore_api.model.equilateral_triangle import EquilateralTriangle -from petstore_api.model.isosceles_triangle import IsoscelesTriangle -from petstore_api.model.scalene_triangle import ScaleneTriangle -from petstore_api.model.triangle import Triangle -from petstore_api.model.triangle_interface import TriangleInterface - - -class TestTriangle(unittest.TestCase): - """Triangle unit test stubs""" - - def testTriangle(self): - """Test Triangle""" - tri_classes = [EquilateralTriangle, IsoscelesTriangle, ScaleneTriangle] - for tri_class in tri_classes: - tri = Triangle(shapeType="Triangle", triangleType=tri_class.__name__) - assert isinstance(tri, tri_class) - assert isinstance(tri, Triangle) - assert isinstance(tri, TriangleInterface) - assert isinstance(tri, frozendict.frozendict) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py b/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py deleted file mode 100644 index 5f52c56f5af..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_user_api.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" -import unittest -from unittest.mock import patch - -import petstore_api -from petstore_api import api_client -from petstore_api.apis.tags.user_api import UserApi -from petstore_api.rest import RESTClientObject - -from . import ApiTestMixin - - -class TestUserApi(ApiTestMixin): - """UserApi unit test stubs""" - configuration = petstore_api.Configuration() - api = UserApi(api_client=api_client.ApiClient(configuration=configuration)) - - def test_create_user(self): - """Test case for create_user - - Create user # noqa: E501 - """ - pass - - def test_create_users_with_array_input(self): - """Test case for create_users_with_array_input - - Creates list of users with given input array # noqa: E501 - """ - pass - - def test_create_users_with_list_input(self): - """Test case for create_users_with_list_input - - Creates list of users with given input array # noqa: E501 - """ - pass - - def test_delete_user(self): - """Test case for delete_user - - Delete user # noqa: E501 - """ - pass - - def test_get_user_by_name(self): - from petstore_api.model import user - - # serialization + deserialization works - with patch.object(RESTClientObject, 'request') as mock_request: - value_simple = dict( - id=1, - username='first last', - firstName='first', - lastName='last' - ) - body = user.User(**value_simple) - mock_request.return_value = self.response( - self.json_bytes(value_simple) - ) - - api_response = self.api.get_user_by_name( - path_params=dict(username='first last') - ) - self.assert_request_called_with( - mock_request, - 'http://petstore.swagger.io:80/v2/user/first%20last', - method='GET', - accept_content_type='application/xml, application/json', - content_type=None - ) - - assert isinstance(api_response.body, user.User) - assert api_response.body == body - - def test_login_user(self): - """Test case for login_user - - Logs user into the system # noqa: E501 - """ - pass - - def test_logout_user(self): - """Test case for logout_user - - Logs out current logged in user session # noqa: E501 - """ - pass - - def test_update_user(self): - """Test case for update_user - - Updated user # noqa: E501 - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_uuid_string.py b/samples/openapi3/client/petstore/python/tests_manual/test_uuid_string.py deleted file mode 100644 index e8715b571a7..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_uuid_string.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - -import unittest - -from petstore_api import schemas, exceptions -from petstore_api.model.uuid_string import UUIDString -import uuid - - -class TestUUIDString(unittest.TestCase): - """UUIDString unit test stubs""" - - def test_UUIDString(self): - """Test UUIDString""" - uuid_value = '12345678-1234-5678-1234-567812345678' - u = UUIDString(uuid_value) - self.assertEqual(u, uuid_value) - self.assertTrue(isinstance(u, UUIDString)) - self.assertTrue(isinstance(u, schemas.UUIDSchema)) - self.assertTrue(isinstance(u, schemas.StrSchema)) - self.assertTrue(isinstance(u, str)) - self.assertEqual(u.as_uuid_oapg, uuid.UUID(uuid_value)) - - # passing in a uuid also works - u = UUIDString(uuid.UUID(uuid_value)) - self.assertEqual(u, uuid_value) - self.assertTrue(isinstance(u, UUIDString)) - self.assertTrue(isinstance(u, schemas.UUIDSchema)) - self.assertTrue(isinstance(u, schemas.StrSchema)) - self.assertTrue(isinstance(u, str)) - self.assertEqual(u.as_uuid_oapg, uuid.UUID(uuid_value)) - - # an invalid value does not work - with self.assertRaises(exceptions.ApiValueError): - UUIDString('1') - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py b/samples/openapi3/client/petstore/python/tests_manual/test_validate.py deleted file mode 100644 index 4a61f9c7f9e..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_validate.py +++ /dev/null @@ -1,286 +0,0 @@ -# coding: utf-8 -import decimal -from decimal import Decimal -from unittest.mock import patch, call -import unittest - -import frozendict - -from petstore_api.model.string_with_validation import StringWithValidation -from petstore_api.model.string_enum import StringEnum -from petstore_api.model.number_with_validations import NumberWithValidations -from petstore_api.model.array_holding_any_type import ArrayHoldingAnyType -from petstore_api.model.array_with_validations_in_items import ( - ArrayWithValidationsInItems, -) -from petstore_api.model.foo import Foo -from petstore_api.model.animal import Animal -from petstore_api.model.dog import Dog -from petstore_api.model.boolean_enum import BooleanEnum -from petstore_api.model.pig import Pig -from petstore_api.model.danish_pig import DanishPig -from petstore_api.model.gm_fruit import GmFruit -from petstore_api.model.apple import Apple -from petstore_api.model.banana import Banana -from petstore_api import schemas - -from petstore_api.schemas import ( - AnyTypeSchema, - BoolClass, - NoneClass, - StrSchema, - NumberSchema, - Schema, - ValidationMetadata, -) - - -class TestValidateResults(unittest.TestCase): - def test_str_validate(self): - vm = ValidationMetadata() - path_to_schemas = StringWithValidation._validate_oapg( - "abcdefg", validation_metadata=vm - ) - assert path_to_schemas == {("args[0]",): {StringWithValidation, str}} - - def test_number_validate(self): - vm = ValidationMetadata() - path_to_schemas = NumberWithValidations._validate_oapg( - Decimal(11), validation_metadata=vm - ) - assert path_to_schemas == {("args[0]",): {NumberWithValidations, Decimal}} - - def test_str_enum_validate(self): - vm = ValidationMetadata() - path_to_schemas = StringEnum._validate_oapg("placed", validation_metadata=vm) - assert path_to_schemas == {("args[0]",): {str, StringEnum}} - - def test_nullable_enum_validate(self): - vm = ValidationMetadata() - path_to_schemas = StringEnum._validate_oapg(NoneClass.NONE, validation_metadata=vm) - assert path_to_schemas == {("args[0]",): {NoneClass, StringEnum}} - - def test_empty_list_validate(self): - vm = ValidationMetadata() - path_to_schemas = ArrayHoldingAnyType._validate_oapg((), validation_metadata=vm) - assert path_to_schemas == {("args[0]",): {ArrayHoldingAnyType, tuple}} - - def test_list_validate(self): - vm = ValidationMetadata() - path_to_schemas = ArrayHoldingAnyType._validate_oapg( - (Decimal(1), "a"), validation_metadata=vm - ) - assert path_to_schemas == { - ("args[0]",): {ArrayHoldingAnyType, tuple}, - ("args[0]", 0): {AnyTypeSchema, Decimal}, - ("args[0]", 1): {AnyTypeSchema, str}, - } - - def test_empty_dict_validate(self): - vm = ValidationMetadata() - path_to_schemas = Foo._validate_oapg(frozendict.frozendict({}), validation_metadata=vm) - assert path_to_schemas == {("args[0]",): {Foo, frozendict.frozendict}} - - def test_dict_validate(self): - vm = ValidationMetadata() - path_to_schemas = Foo._validate_oapg( - frozendict.frozendict({"bar": "a", "additional": Decimal(0)}), - validation_metadata=vm, - ) - assert path_to_schemas == { - ("args[0]",): {Foo, frozendict.frozendict}, - ("args[0]", "bar"): {StrSchema, str}, - ("args[0]", "additional"): {schemas.UnsetAnyTypeSchema, decimal.Decimal}, - } - - def test_discriminated_dict_validate(self): - vm = ValidationMetadata() - path_to_schemas = Animal._validate_oapg( - frozendict.frozendict(className="Dog", color="black"), validation_metadata=vm - ) - for path, schema_classes in path_to_schemas.items(): - Animal._process_schema_classes_oapg(schema_classes) - assert path_to_schemas == { - ("args[0]",): {Animal, Dog, Dog.MetaOapg.all_of()[1], frozendict.frozendict}, - ("args[0]", "className"): {StrSchema, str}, - ("args[0]", "color"): {StrSchema, str}, - } - - def test_bool_enum_validate(self): - vm = ValidationMetadata() - path_to_schemas = BooleanEnum._validate_oapg(BoolClass.TRUE, validation_metadata=vm) - assert path_to_schemas == {("args[0]",): {BoolClass, BooleanEnum}} - - def test_oneof_composition_pig_validate(self): - vm = ValidationMetadata() - path_to_schemas = Pig._validate_oapg( - frozendict.frozendict(className="DanishPig"), validation_metadata=vm - ) - for path, schema_classes in path_to_schemas.items(): - Pig._process_schema_classes_oapg(schema_classes) - assert path_to_schemas == { - ("args[0]",): {Pig, DanishPig, frozendict.frozendict}, - ("args[0]", "className"): {DanishPig.MetaOapg.properties.className, str}, - } - - def test_anyof_composition_gm_fruit_validate(self): - vm = ValidationMetadata() - path_to_schemas = GmFruit._validate_oapg( - frozendict.frozendict(cultivar="GoldenDelicious", lengthCm=Decimal(10)), - validation_metadata=vm, - ) - for path, schema_classes in path_to_schemas.items(): - GmFruit._process_schema_classes_oapg(schema_classes) - assert path_to_schemas == { - ("args[0]",): {GmFruit, Apple, Banana, frozendict.frozendict}, - ("args[0]", "cultivar"): {Apple.MetaOapg.properties.cultivar, str}, - ("args[0]", "lengthCm"): {NumberSchema, Decimal}, - } - - -class TestValidateCalls(unittest.TestCase): - def test_empty_list_validate(self): - return_value = {("args[0]",): {ArrayHoldingAnyType, tuple}} - with patch.object( - Schema, "_validate_oapg", return_value=return_value - ) as mock_validate: - ArrayHoldingAnyType([]) - assert mock_validate.call_count == 1 - - with patch.object( - Schema, "_validate_oapg", return_value=return_value - ) as mock_validate: - ArrayHoldingAnyType.from_openapi_data_oapg([]) - assert mock_validate.call_count == 1 - - def test_empty_dict_validate(self): - return_value = {("args[0]",): {Foo, frozendict.frozendict}} - with patch.object( - Schema, "_validate_oapg", return_value=return_value - ) as mock_validate: - Foo({}) - assert mock_validate.call_count == 1 - - with patch.object( - Schema, "_validate_oapg", return_value=return_value - ) as mock_validate: - Foo.from_openapi_data_oapg({}) - assert mock_validate.call_count == 1 - - def test_list_validate_direct_instantiation(self): - results = [ - {("args[0]",): {ArrayWithValidationsInItems, tuple}}, - {("args[0]", 0): {ArrayWithValidationsInItems.MetaOapg.items, Decimal}} - ] - with patch.object(Schema, "_validate_oapg", side_effect=results) as mock_validate: - ArrayWithValidationsInItems([7]) - calls = [ - call( - (Decimal("7"),), - validation_metadata=ValidationMetadata(path_to_item=("args[0]",)) - ), - call( - Decimal("7"), - validation_metadata=ValidationMetadata(path_to_item=("args[0]", 0)) - ) - ] - mock_validate.assert_has_calls( - calls - ) - - def test_list_validate_direct_instantiation_cast_item(self): - # item validation is skipped if items are of the correct type - item = ArrayWithValidationsInItems.MetaOapg.items(7) - return_value = {("args[0]",): {ArrayWithValidationsInItems, tuple}} - with patch.object(Schema, "_validate_oapg", return_value=return_value) as mock_validate: - ArrayWithValidationsInItems([item]) - mock_validate.assert_called_once_with( - tuple([Decimal('7')]), - validation_metadata=ValidationMetadata( - validated_path_to_schemas={('args[0]', 0): {ArrayWithValidationsInItems.MetaOapg.items, Decimal}} - ) - ) - - def test_list_validate_from_openai_data_instantiation(self): - - results = [ - {("args[0]",): {ArrayWithValidationsInItems, tuple}}, - {("args[0]", 0): {ArrayWithValidationsInItems.MetaOapg.items, Decimal}} - ] - with patch.object(Schema, "_validate_oapg", side_effect=results) as mock_validate: - ArrayWithValidationsInItems.from_openapi_data_oapg([7]) - calls = [ - call( - (Decimal("7"),), - validation_metadata=ValidationMetadata(path_to_item=("args[0]",), from_server=True) - ), - call( - Decimal("7"), - validation_metadata=ValidationMetadata(path_to_item=("args[0]", 0), from_server=True) - ) - ] - mock_validate.assert_has_calls( - calls - ) - - def test_dict_validate_direct_instantiation(self): - call_results = [ - {("args[0]",): {Foo, frozendict.frozendict}}, - {("args[0]", "bar"): {StrSchema, str}} - ] - with patch.object(Schema, "_validate_oapg", side_effect=call_results) as mock_validate: - Foo(bar="a") - calls = [ - call( - frozendict.frozendict({"bar": "a"}), - validation_metadata=ValidationMetadata(path_to_item=("args[0]",)), - ), - call( - "a", - validation_metadata=ValidationMetadata(path_to_item=("args[0]", "bar")), - ), - ] - mock_validate.assert_has_calls( - calls - ) - - def test_dict_validate_direct_instantiation_cast_item(self): - bar = StrSchema("a") - return_value = { - ("args[0]",): {Foo, frozendict.frozendict} - } - # only the Foo dict is validated because the bar property value was already validated - with patch.object(Schema, "_validate_oapg", return_value=return_value) as mock_validate: - Foo(bar=bar) - mock_validate.assert_called_once_with( - frozendict.frozendict(dict(bar='a')), - validation_metadata=ValidationMetadata( - validated_path_to_schemas={('args[0]', 'bar'): {str, StrSchema}} - ) - ) - - def test_dict_validate_from_openapi_data_instantiation(self): - - return_values = [ - {("args[0]",): {Foo, frozendict.frozendict}}, - {("args[0]", 'bar'): {StrSchema, str}} - ] - with patch.object(Schema, "_validate_oapg", side_effect=return_values) as mock_validate: - Foo.from_openapi_data_oapg({"bar": "a"}) - calls = [ - call( - frozendict.frozendict({"bar": "a"}), - validation_metadata=ValidationMetadata(path_to_item=("args[0]",), from_server=True), - ), - call( - "a", - validation_metadata=ValidationMetadata(path_to_item=("args[0]", "bar"), from_server=True), - ), - ] - mock_validate.assert_has_calls( - calls - ) - - -if __name__ == "__main__": - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_whale.py b/samples/openapi3/client/petstore/python/tests_manual/test_whale.py deleted file mode 100644 index 7ce302faf99..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/test_whale.py +++ /dev/null @@ -1,49 +0,0 @@ -# coding: utf-8 - -""" - OpenAPI Petstore - - This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 - - The version of the OpenAPI document: 1.0.0 - Generated by: https://openapi-generator.tech -""" - - -import sys -import unittest - -import petstore_api -from petstore_api.schemas import BoolClass -from petstore_api.model.whale import Whale - - -class TestWhale(unittest.TestCase): - """Whale unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def test_Whale(self): - # test that the hasBaleen __bool__ method is working, True input - whale = Whale( - className='whale', - hasBaleen=True - ) - assert isinstance(whale["hasBaleen"], BoolClass) - self.assertTrue(whale["hasBaleen"]) - - # test that the hasBaleen __bool__ method is working, False input - whale = Whale( - className='whale', - hasBaleen=False - ) - assert isinstance(whale["hasBaleen"], BoolClass) - self.assertFalse(whale["hasBaleen"]) - - -if __name__ == '__main__': - unittest.main() diff --git a/samples/openapi3/client/petstore/python/tests_manual/util.py b/samples/openapi3/client/petstore/python/tests_manual/util.py deleted file mode 100644 index 113d7dcc547..00000000000 --- a/samples/openapi3/client/petstore/python/tests_manual/util.py +++ /dev/null @@ -1,8 +0,0 @@ -# flake8: noqa - -import random - - -def id_gen(bits=32): - """ Returns a n-bit randomly generated int """ - return int(random.getrandbits(bits)) diff --git a/samples/openapi3/client/petstore/python/tox.ini b/samples/openapi3/client/petstore/python/tox.ini deleted file mode 100644 index e57c17e10c1..00000000000 --- a/samples/openapi3/client/petstore/python/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py37 - -[testenv] -passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=petstore_api